Block

class guppyft.code.iceberg.logical.Block[source]
static __new__() Block[N][source]
all_but_one_rx(i: int, phase: float) None[source]

Rx rotation of phase radians on qubits except that with index i.

all_but_one_rz(i: int, phase: float) None[source]

Rz rotation of phase radians on qubits except that with index i.

all_but_one_x(i: int) None[source]

X gate on all qubits except that with index i.

all_but_one_z(i: int) None[source]

Z gate on all qubits except that with index i.

all_h() None[source]

H gate on all qubits.

all_rx(phase: float) None[source]

Rx rotation of phase radians on all qubits.

all_ry(phase: float) None[source]

Ry rotation of phase radians on all qubits.

all_rz(phase: float) None[source]

Rz rotation of phase radians on all qubits.

all_x() None[source]

X gate on all qubits.

all_y() None[source]

Y gate on all qubits.

all_z() None[source]

Z gate on all qubits.

cx(i: int, j: int) None[source]

CX gate on the qubits with indices i (control) and j (target).

fan_in(i: int) None[source]

Fan-in to the qubit with index i from all others.

fan_out(i: int) None[source]

Fan-out from the qubit with index i to all others.

measure_syndrome() tuple[Measurement, Measurement][source]

Syndrome measurement.

rx(i: int, phase: float) None[source]

Rx rotation of phase radians on the qubit with index i.

ry(i: int, phase: float) None[source]

Ry rotation of phase radians on the qubit with index i.

rz(i: int, phase: float) None[source]

Rz rotation of phase radians on the qubit with index i.

swap(i: int, j: int) None[source]

Swap of the qubits with indices i and j.

try_measure_one_x(i: int) Option[Measurement][source]

Fallible non-destructive measurement in the X basis of the qubit with index i.

try_measure_one_z(i: int) Option[Measurement][source]

Fallible non-destructive measurement in the Z basis of the qubit with index i.

x(i: int) None[source]

X gate on the qubit with index i.

x_with_all_but_one_z(i: int) None[source]

X gate on the qubit with index i; Z on all others.

xx(i: int, j: int) None[source]

X gate on the qubits with indices i and j.

xx_phase(i: int, j: int, phase: float) None[source]

XXPhase rotation of phase radians on the qubits with indices i and j.

y(i: int) None[source]

Y gate on the qubit with index i.

yy(i: int, j: int) None[source]

Y gate on the qubits with indices i and j.

yy_phase(i: int, j: int, phase: float) None[source]

YYPhase rotation of phase radians on the qubits with indices i and j.

z(i: int) None[source]

Z gate on the qubit with index i.

z_with_all_but_one_x(i: int) None[source]

Z gate on the qubit with index i; X on all others.

zz(i: int, j: int) None[source]

Z gate on the qubits with indices i and j.

zz_phase(i: int, j: int, phase: float) None[source]

ZZPhase rotation of phase radians on the qubits with indices i and j.