PlaquetteQubits#

class tqec.plaquette.PlaquetteQubits(data_qubits: 'list[GridQubit]', syndrome_qubits: 'list[GridQubit]')[source]#

Bases: object

Methods

__init__(data_qubits, syndrome_qubits)

get_edge_qubits([orientation])

Return the data qubits on the edge of the plaquette.

get_qubits_on_side(side)

Return the qubits one the provided side of the instance.

Attributes

all_qubits

data_qubits_indices

data_qubits_with_indices

qubit_map

syndrome_qubits_indices

syndrome_qubits_with_indices

data_qubits

syndrome_qubits

Detailed methods

Parameters:
  • data_qubits (list[GridQubit])

  • syndrome_qubits (list[GridQubit])

__init__(data_qubits, syndrome_qubits)#
Parameters:
  • data_qubits (list[GridQubit])

  • syndrome_qubits (list[GridQubit])

Return type:

None

get_edge_qubits(orientation=Orientation.HORIZONTAL)[source]#

Return the data qubits on the edge of the plaquette. By convention, the edge is the one with the highest index in the relevant axis.

Parameters:

orientation (TemplateOrientation, optional) – Whether to use horizontal or vertical orientation as the axis. Defaults to horizontal.

Returns:

The qubits on the edge of the plaquette.

Return type:

list[GridQubit]

get_qubits_on_side(side)[source]#

Return the qubits one the provided side of the instance.

A qubit is on the left-side if there is no other qubit in the instance with a strictly lower x-coordinate value. Similarly, a qubit is on the right-side if there is no other qubit in the instance with a strictly greater x-coordinate value. Up and down are about the y-coordinate.

Parameters:

side (PlaquetteSide) – the side to find qubits on.

Returns:

The qubits on the edge of the plaquette.

Return type:

list[GridQubit]