tqec.templates.qubit.Qubit4WayJunctionTemplate#
- class Qubit4WayJunctionTemplate(default_increments: Displacement | None = None)[source]#
An error-corrected qubit that is making a 4-way junction with other logical qubits.
The below text represents this template for an input
k == 4
1 5 6 5 6 5 6 5 6 2 7 10 11 10 11 10 11 10 11 12 8 11 10 11 10 11 10 11 9 13 7 9 11 10 11 10 11 9 11 12 8 11 9 11 10 11 9 11 9 13 7 9 11 9 11 10 11 9 11 12 8 11 9 11 10 11 10 11 9 13 7 9 11 10 11 10 11 10 11 12 8 11 10 11 10 11 10 11 10 13 3 14 15 14 15 14 15 14 15 4
Warning
For k == 1, this template does not include any of the plaquette indexed 9 and so its instantiation has a “hole” in the plaquette indices.
- __init__(default_increments: Displacement | None = None) None #
Base class for all the templates.
This class is the base of all templates and provide the necessary interface that all templates should implement to be usable by the library.
- Parameters:
default_increments – default increments between two plaquettes. Defaults to Displacement(2, 2) when None
Methods
__init__
([default_increments])Base class for all the templates.
get_increments
()Get the default increments of the template.
get_midline_plaquettes
(k[, orientation])Returns the default observable qubits for the template.
get_spatially_distinct_subtemplates
(k[, ...])Returns a representation of all the distinct sub-templates of the provided manhattan radius.
instantiate
(k[, plaquette_indices])Generate the numpy array representing the template.
instantiation_origin
(k)Coordinates of the top-left entry origin.
shape
(k)Returns the current template shape.
Attributes
expected_plaquettes_number
Returns the number of plaquettes expected from the instantiate method.
scalable_shape
Returns a scalable version of the template shape.