Block

class guppyft.code.helix.logical.Block[source]

A block of two logical qubits, prepared as |00> by construction.

static __new__() → Block[source]

Prepare a new Block resource.

cx() → None[source]

Apply CX from qubit 0 to 1.

cz() → None[source]

Apply logical CZ.

free() → None[source]

Discard this resource.

h_all() → None[source]

Apply Hadamard to both qubits.

measure_x_all() → LogicalMeasurement[2][source]

Destructively measure both logical qubits in the X basis.

measure_z_all() → LogicalMeasurement[2][source]

Destructively measure both logical qubits in the Z basis.

qec_cycle() → None[source]

Perform a block QEC cycle.

ss() → None[source]

Apply S to both logical qubits.

swap() → None[source]

Exchange the two logical qubits.

t(i: int) → None[source]

Apply T by preparing and consuming a magic resource.

tdg(i: int) → None[source]

Apply Tdg by preparing and consuming a magic resource.

x(i: int) → None[source]

Apply X.

y(i: int) → None[source]

Apply Y.

z(i: int) → None[source]

Apply Z.