Skip to content

Commit

Permalink
Test calibration ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
notmgsk committed Nov 12, 2020
1 parent d2bd2d6 commit a46d6a8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pyquil/tests/test_quilt.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,19 @@ def test_program_calibrate():
assert calibrated == Program('SHIFT-PHASE 0 "rf" -pi').instructions


def test_program_calibrate_order():
"""Test that later calibrations take preference over earlier calibrations."""
prog = Program("""
DEFCAL I 0:
SHIFT-PHASE 0 "rz" 1.0
DEFCAL I 0:
SHIFT-PHASE 0 "rz" 0.0
""")
calibrated = prog.calibrate(Gate("I", [], [Qubit(0)]))
assert calibrated == Program("""SHIFT-PHASE 0 "rz" 0.0""").instructions


def test_merge_programs_with_quilt_features():
prog_1 = Program(
"""
Expand Down

0 comments on commit a46d6a8

Please sign in to comment.