Block¶
- class guppyft.code.iceberg.logical.Block[source]¶
An Iceberg logical block containing N logical qubits.
- measure_syndrome() tuple[Measurement, Measurement][source]¶
Syndrome measurement.
- pauli_exp_all_x(phase: float) None[source]¶
Apply the logical all-X Pauli exponential.
\[\exp(-i \theta X^{\otimes k} / 2)\]where \(\theta\) is
phasein radians and \(k\) is the number of logical qubits in the block.
- pauli_exp_all_x_except_at(i: int, phase: float) None[source]¶
Apply the Pauli exponential with I at
iand X elsewhere.\[\exp(-i \theta ( X^{\otimes i} \otimes I \otimes X^{\otimes(k-i-1)} ) / 2)\]where \(\theta\) is
phasein radians and \(k\) is the number of logical qubits in the block.
- pauli_exp_all_x_except_z_at(i: int, phase: float) None[source]¶
Apply the Pauli exponential with Z at
iand X elsewhere.\[\exp(-i \theta ( X^{\otimes i} \otimes Z \otimes X^{\otimes(k-i-1)} ) / 2)\]where \(\theta\) is
phasein radians and \(k\) is the number of logical qubits in the block.
- pauli_exp_all_y(phase: float) None[source]¶
Apply the logical all-Y Pauli exponential.
\[\exp(-i \theta Y^{\otimes k} / 2)\]where \(\theta\) is
phasein radians and \(k\) is the number of logical qubits in the block.
- pauli_exp_all_z(phase: float) None[source]¶
Apply the logical all-Z Pauli exponential.
\[\exp(-i \theta Z^{\otimes k} / 2)\]where \(\theta\) is
phasein radians and \(k\) is the number of logical qubits in the block.
- pauli_exp_all_z_except_at(i: int, phase: float) None[source]¶
Apply the Pauli exponential with I at
iand Z elsewhere.\[\exp(-i \theta ( Z^{\otimes i} \otimes I \otimes Z^{\otimes(k-i-1)} ) / 2)\]where \(\theta\) is
phasein radians and \(k\) is the number of logical qubits in the block.
- pauli_exp_all_z_except_x_at(i: int, phase: float) None[source]¶
Apply the Pauli exponential with X at
iand Z elsewhere.\[\exp(-i \theta ( Z^{\otimes i} \otimes X \otimes Z^{\otimes(k-i-1)} ) / 2)\]where \(\theta\) is
phasein radians and \(k\) is the number of logical qubits in the block.
- ry(i: int, phase: float) None[source]¶
Ry rotation of
phaseradians on logical qubiti.Ry is not a primitive and is implemented here as .. math:
R_y(\theta) = R_x(-\pi/2) R_z(\theta) R_x(\pi/2)
where \(\theta\) is
phase.
- 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.
- xx_phase(i: int, j: int, phase: float) None[source]¶
XXPhase rotation of phase radians on the qubits with indices i and j.