Skip to content

Commit

Permalink
Fixing a couple of typos in rzz tests (#2084)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaelbh authored Dec 17, 2024
1 parent 960f267 commit c6198f8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/unit/test_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,8 @@ def test_rzz_parametrized_angle_validation(self, angle):
backend = FakeFractionalBackend()
param = Parameter("p")

with self.subTest("parameter"):
circ = QuantumCircuit(2)
circ.rzz(param, 0, 1)
# Should run without an error
SamplerV2(backend).run(pubs=[(circ, [1])])
circ = QuantumCircuit(2)
circ.rzz(param, 0, 1)

if angle == 1:
SamplerV2(backend).run(pubs=[(circ, [angle])])
Expand All @@ -320,7 +317,9 @@ def test_rzz_parametrized_angle_validation(self, angle):

@data(("a", -1), ("b", 2), ("d", 3), (-1, 1), (1, 2), None)
def test_rzz_complex(self, flawed_params):
"""Testing rzz validation in the currently non-existing case of dynamic instructions"""
"""Testing rzz validation, a variation of test_rzz_parametrized_angle_validation which
tests a more complex case. In addition, we test the currently non-existing case of dynamic
instructions."""
# pylint: disable=not-context-manager

# FakeFractionalBackend has both fractional and dynamic instructions
Expand Down

0 comments on commit c6198f8

Please sign in to comment.