class GraphRepresentation
add_dummy
add_lane
c_nxyz
c_nzyx
c_xnyz
c_xynz
c_xyz
c_znyx
c_zynx
c_zyx
cnot
correlated_error
correlated_error_probs
probs[0]is the probability that no branch fires.probs[1 \<\< i]is the probability that branchifires after all previous branches did not fire.
probabilities(list[float]) — List of conditional probabilities [p1, p2, …, pk]
np.ndarray— Array of shape (2^k,) with probabilities for each outcome.
cxswap
cy
cz
czswap
depolarize1
depolarize2
detector
ensure_lane
error_probs
[P(bit0=0), P(bit0=1)].
finalize_correlated_error
- Rename all “c{i}” phases to “e{num_error_bits + i}” in the graph
- Compute and append the 2^k probability array to channel_probs
- Increment num_error_bits by k
- Reset num_correlated_error_bits to 0 and correlated_error_probs to []
h
h_nxy
h_nxz
h_nyz
h_xy
h_yz
heralded_erase
heralded_pauli_channel_1
heralded_pauli_channel_1_probs
- bit 0: herald bit, written to the measurement record
- bit 1: Z error component
- bit 2: X error component
- index 0 (0b000): no herald, no Pauli error
- index 1 (0b001): herald + I
- index 3 (0b011): herald + Z
- index 5 (0b101): herald + X
- index 7 (0b111): herald + Y, represented as X+Z
i
ii
iswap
iswap_dag
last_edge
last_row
m
mpad
b(GraphRepresentation) — The graph representation to modify.value(int) — The bit value to record (0 or 1).p(float) — Error probability for the recorded bit.
mpp
b(GraphRepresentation) — The graph representation to modify.paulis(list[tuple[Literal['X', 'Y', 'Z'], int]]) — List of (pauli_type, qubit) pairs defining the Pauli product.invert(bool) — Whether to invert the measurement result.p(float) — Measurement flip error probability.
mr
mrx
mry
mx
mxx
my
myy
mzz
observable_include
pauli_channel_1
pauli_channel_1_probs
- bit 0: Z error component
- bit 1: X error component
- index 0 (0b00): I
- index 1 (0b01): Z
- index 2 (0b10): X
- index 3 (0b11): Y
pauli_channel_2
pauli_channel_2_probs
- bit 0: Z error component on
qubit_i - bit 1: X error component on
qubit_i - bit 2: Z error component on
qubit_j - bit 3: X error component on
qubit_j
z_i + 2*x_i + 4*z_j + 8*x_j stores the
probability for the corresponding two-qubit Pauli outcome. The arguments
follow Stim’s naming convention: pix is I on qubit_i and X on
qubit_j, pzi is Z on qubit_i and I on qubit_j, etc.
r
r_x
r_y
r_z
rx
ry
s
s_dag
spp
SPP Z0 is the S gate and SPP_DAG Z0 is S_DAG.
Parameters:
b(GraphRepresentation) — The graph representation to modify.paulis(list[tuple[Literal['X', 'Y', 'Z'], int]]) — List of (pauli_type, qubit) pairs defining the Pauli product P.dagger(bool) — If True, apply exp(+i pi/4 P) (phase by -i) instead.
sqrt_x
sqrt_x_dag
sqrt_xx
sqrt_xx_dag
sqrt_y
sqrt_y_dag
sqrt_yy
sqrt_yy_dag
sqrt_z
sqrt_z_dag
sqrt_zz
sqrt_zz_dag
swap
swapcx
swapcz
t
t_dag
tick
tpp
TPP Z0 is the T gate and TPP_DAG Z0 is T_DAG.
Parameters:
b(GraphRepresentation) — The graph representation to modify.paulis(list[tuple[Literal['X', 'Y', 'Z'], int]]) — List of (pauli_type, qubit) pairs defining the Pauli product P.dagger(bool) — If True, apply exp(+i pi/8 P) (phase by exp(-i pi/4)) instead.
u3
x
x_error
x_phase
r_x up to a phase.
xcx
xcy
xcz
y
y_error
ycx
ycy
ycz
z
z_error
z_phase
r_z up to a phase.