-
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.
Add the ability to tag circuit instructions (#848)
- For example, `TICK[100ns]` instead of `TICK` or `I[DYNAMICDECOUPLE] 2 3 5` instead of `I 2 3 5` - Stim ignores tags, except for propagating them through circuit transformations - Users can use tags for debugging or to communicate information from tools generating stim circuits to tools consuming them ```python import stim circuit = stim.Circuit(""" R[mlr] 0 1 TICK[200ns] H 0 TICK[10ns] REPEAT[unroll] 3 { CZ[adiabatic] 0 1 TICK[20ns] } H 0 TICK[20ns] I[DYNAMIC_DECOUPLE_NEW_LATEST_VERSION_5_FINAL_ACTUALLY_FINAL_YXY] 2 3 4 5 M[include_two_state] 0 1 DETECTOR[subgraph_2] rec[-1] rec[-2] """) assert circuit[0].tag == "mlr" assert circuit[1].tag == "200ns" assert circuit[2].tag == "" ``` Fixes #843
- Loading branch information
Showing
53 changed files
with
1,616 additions
and
589 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
Oops, something went wrong.