deltakit.circuit.GateLayer#

class deltakit.circuit.GateLayer(gates: I | X | Y | Z | H | S | S_DAG | SQRT_X | SQRT_X_DAG | SQRT_Y | SQRT_Y_DAG | H_XY | H_YZ | C_XYZ | C_ZYX | CX | CXSWAP | CY | CZ | CZSWAP | ISWAP | ISWAP_DAG | SQRT_XX | SQRT_XX_DAG | SQRT_YY | SQRT_YY_DAG | SQRT_ZZ | SQRT_ZZ_DAG | SWAP | XCX | XCY | XCZ | YCX | YCY | YCZ | RZ | RX | RY | MX | MY | MZ | MRX | MRY | MRZ | HERALD_LEAKAGE_EVENT | MPP | Iterable[I | X | Y | Z | H | S | S_DAG | SQRT_X | SQRT_X_DAG | SQRT_Y | SQRT_Y_DAG | H_XY | H_YZ | C_XYZ | C_ZYX | CX | CXSWAP | CY | CZ | CZSWAP | ISWAP | ISWAP_DAG | SQRT_XX | SQRT_XX_DAG | SQRT_YY | SQRT_YY_DAG | SQRT_ZZ | SQRT_ZZ_DAG | SWAP | XCX | XCY | XCZ | YCX | YCY | YCZ | RZ | RX | RY | MX | MY | MZ | MRX | MRY | MRZ | HERALD_LEAKAGE_EVENT | MPP] | None = None)#

Bases: Generic[T]

Class which represents a single time step in a circuit for gates. A single qubit can be acted on at most one time in each layer.

Methods#

GateLayer.add_gates

Add a gate to the circuit layer.

GateLayer.approx_equals

Determine whether two gate layers are approximately equal within a tolerance.

GateLayer.permute_stim_circuit

Updates stim_circuit with the stim circuit which contains the gates specified in this GateLayer.

GateLayer.replace_gates

Replace all gates according to the gate replacement policy

GateLayer.transform_qubits

Transform all gates in this gate layer according to the id mapping.