SquarePlaquetteQubits#

class tqec.plaquette.SquarePlaquetteQubits[source]#

Bases: PlaquetteQubits

Methods

__init__()

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

__init__()[source]#
Return type:

None

get_edge_qubits(orientation=Orientation.HORIZONTAL)#

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)#

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]