Skip to content

Conversation

@Strilanc
Copy link
Collaborator

@Strilanc Strilanc commented Oct 28, 2024

  • 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
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

- Fix `SPP` not being classified as a unitary gate
- Fix `SPP_DAG` not being classified as a unitary gate

Fixes #846
- For example, `TICK[100ns]` instead of `TICK` or `I[DYNAMICDECOUPLE] 2 3 5` instead of `I 2 3 5`
- There are likely still places where tags are not flowing through as they should

TODO BEFORE MERGE: add unit tests, modify file format documentation

Fixes #843
…ableauspp

# Conflicts:
#	src/stim/simulators/error_analyzer.test.cc
# Conflicts:
#	src/stim/simulators/error_analyzer.test.cc
@Strilanc Strilanc merged commit 2581b90 into main Nov 1, 2024
57 checks passed
@Strilanc Strilanc deleted the terribletags branch November 1, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tags to stim circuit instructions

2 participants