Skip to content

Commit

Permalink
note for correctness
Browse files Browse the repository at this point in the history
MarquessV committed Apr 16, 2024
1 parent 3dc2f57 commit a0e876d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/unit/test_quil.py
Original file line number Diff line number Diff line change
@@ -1227,7 +1227,11 @@ def test_program_equality():
H 1
CNOT 2 3""")

# Definitions in Quil are global in the sense that where they are defined in the program does not matter.
# Definitions in Quil are "global" in the sense that the order they are defined in the program does should not
# effect equality.
# Note: pyQuil de-duplicates DEFCAL and DEFCAL MEASURE definitions. If that were not the case, then calibration
# order _would_ matter. During expansion, the last calibration to be defined that matches a signature would be
# applied.
def is_global_state_instruction(i: AbstractInstruction) -> bool:
return isinstance(i, (DefFrame, DefCalibration, DefMeasureCalibration, DefWaveform, DefGate))

0 comments on commit a0e876d

Please sign in to comment.