You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow OBSERVABLE_INCLUDE to target Pauli terms (#853)
There are two use cases driving this change:
1. Magic state injection needing requiring partially deterministic
observables
2. Simulating all observables of a code without needing to add noiseless
ancilla qubits to the circuit
This change allows observables to be split into pieces (e.g. obs 1 for
the first half of the circuit and obs 2 for the second half, with the
"true" observable their xor). The flip of each individual piece can even
be recovered when using flip simulation, if stabilizer randomization is
disabled.
This change allows finer control over the logical labels that appear in
the detector error model. For example:
```
import stim
assert stim.Circuit("""
OBSERVABLE_INCLUDE(0) X0
OBSERVABLE_INCLUDE(1) Y0
OBSERVABLE_INCLUDE(2) Z0
X_ERROR(0.125) 0
Y_ERROR(0.25) 0
Z_ERROR(0.375) 0
OBSERVABLE_INCLUDE(0) X0
OBSERVABLE_INCLUDE(1) Y0
OBSERVABLE_INCLUDE(2) Z0
""").detector_error_model() == stim.DetectorErrorModel("""
error(0.375) L0 L1
error(0.25) L0 L2
error(0.125) L1 L2
""")
```
0 commit comments