tqec.templates.qubit.QubitHorizontalBorders

class QubitHorizontalBorders(k: int = 2, default_increments: Displacement | None = None)[source]

Two horizontal sides of neighbouring error-corrected qubits glued together.

The below text represents this template for an input k == 2

1 5 6 5 6 2
3 7 8 7 8 4
__init__(k: int = 2, 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:
  • k – initial value for the scaling parameter.

  • default_increments – default increments between two plaquettes. Defaults to Displacement(2, 2) when None

Methods

__init__([k, default_increments])

Base class for all the templates.

get_increments()

Get the default increments of the template.

get_midline_plaquettes([orientation])

Returns the default observable qubits for the template.

get_plaquette_indices_on_sides(sides)

Get the indices of plaquettes that are located on the provided sides.

get_spatially_distinct_subtemplates([...])

Returns a representation of all the distinct sub-templates of the provided manhattan radius.

instantiate([plaquette_indices])

Generate the numpy array representing the template.

scale_to(k)

Scales self to the given scale k.

Attributes

expected_plaquettes_number

Returns the number of plaquettes expected from the instantiate method.

k

scalable_shape

Returns a scalable version of the template shape.

shape

Returns the current template shape.