Documentation Index
Fetch the complete documentation index at: https://tsim.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
class GraphRepresentation
correlated_error
detector
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 []
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.
observable_include
parse_parametric_tag
I[R_Z(theta=0.3*pi)]).
Supports gates: R_Z, R_X, R_Y, U3.
Parameters:
instruction(stim.CircuitInstruction) — The stim instruction whose tag will be parsed.
tuple[str, dict[str, Fraction]] | None— Tuple of (gate_name, params_dict) when the instruction’s tag is atuple[str, dict[str, Fraction]] | None— well-formed parametric tag, orNonewhen the tag is nottuple[str, dict[str, Fraction]] | None— parametric-looking (noname(...)shape, or empty).
ValueError— When the tag looks parametric (matchesname(...)) but is malformed: a parameter value does not parse, the gate name is unknown, or the parameter keys do not match the expected set for the gate.
parse_stim_circuit
stim_circuit(stim.Circuit) — The stim circuit to convert.track_classical_wires(bool) — Whether to track classical wires.
GraphRepresentation— A GraphRepresentation containing the ZX graph and all auxiliary data.
r_x
r_y
r_z
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.
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.