Skip to content

Commit ccbb535

Browse files
committed
Precommit happy after tests use qir variable
1 parent f821b3d commit ccbb535

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

python/tests/pecos/regression/test_qasm/random_cases/test_slr_phys.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def test_bell_qir():
100100
)
101101

102102
qir = SlrConverter(prog).qir()
103+
assert "__quantum__qis__h__body" in qir
103104

104105

105106
def test_bell_qreg_qir():
@@ -112,7 +113,8 @@ def test_bell_qreg_qir():
112113
p.Measure(q) > m,
113114
)
114115

115-
qir = SlrConverter(prog).qir()
116+
qir = SlrConverter(prog).qir()
117+
assert "__quantum__qis__h__body" in qir
116118

117119

118120
def test_if_bell():
@@ -224,7 +226,8 @@ def test_control_flow_qir():
224226
p.RX[0.3](q[0]),
225227
p.Measure(q) > m,
226228
)
227-
qir = SlrConverter(prog).qir()
229+
qir = SlrConverter(prog).qir()
230+
assert "__quantum__qis__h__body" in qir
228231

229232

230233
def test_plus_qir():
@@ -240,7 +243,7 @@ def test_plus_qir():
240243
o.set(m + n),
241244
)
242245
qir = SlrConverter(prog).qir()
243-
print(qir)
246+
assert "add" in qir
244247

245248

246249
def test_nested_xor_qir():
@@ -258,7 +261,7 @@ def test_nested_xor_qir():
258261
p[0].set((m[0] ^ n[0]) ^ o[0]),
259262
)
260263
qir = SlrConverter(prog).qir()
261-
print(qir)
264+
assert "xor" in qir
262265

263266

264267
def test_minus_qir():
@@ -274,9 +277,9 @@ def test_minus_qir():
274277
o.set(m - n),
275278
)
276279
qir = SlrConverter(prog).qir()
277-
print(qir)
280+
assert "sub" in qir
278281

279282

280283
def test_steane_qir():
281284
"""Test the teleportation program using the Steane code."""
282-
print(SlrConverter(telep("X", "X")).qir())
285+
print(SlrConverter(telep("X", "X")).qir())

0 commit comments

Comments
 (0)