Skip to content

Commit

Permalink
fix fixed-qubit test
Browse files Browse the repository at this point in the history
  • Loading branch information
MarquessV committed May 23, 2024
1 parent 9ac6ad1 commit f492c36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions test/unit/__snapshots__/test_quilbase.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@
# name: TestDeclare.test_str[With-Size]
'DECLARE ro OCTET[5]'
# ---
# name: TestDefCalibration.test_out[Fixed-Qubit]
'DEFCAL Calibrate 0:'
# ---
# name: TestDefCalibration.test_out[No-Params]
'''
DEFCAL Calibrate 0:
Expand All @@ -150,6 +153,9 @@
X 0
'''
# ---
# name: TestDefCalibration.test_str[Fixed-Qubit]
'DEFCAL Calibrate 0:'
# ---
# name: TestDefCalibration.test_str[No-Params]
'''
DEFCAL Calibrate 0:
Expand Down
4 changes: 3 additions & 1 deletion test/unit/test_quilbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ def test_parameters(self, calibration: DefCalibration, parameters: List[Paramete
calibration.parameters = [pi / 2]
assert calibration.parameters == [pi / 2]

def test_qubits(self, calibration: DefCalibration, qubits: List[Qubit]):
def test_qubits(self, calibration: DefCalibration, qubits: List[QubitDesignator]):
if len(qubits) > 0 and isinstance(qubits[0], int):
qubits = [Qubit(index) for index in qubits]
assert calibration.qubits == qubits
calibration.qubits = [Qubit(123)]
assert calibration.qubits == [Qubit(123)]
Expand Down

0 comments on commit f492c36

Please sign in to comment.