-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow
OBSERVABLE_INCLUDE
to target Pauli terms
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 """) ```
- Loading branch information
Showing
8 changed files
with
136 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters