Skip to content

Commit

Permalink
Revert disabling validation of parameter type when binding expression…
Browse files Browse the repository at this point in the history
… in gate

I had disabled this because it uncovered a bug in gates-in-rust. The changes
that led to this in gates-in-rust have now been reverted and merged into this
branch. So I am re-enabling the test.
  • Loading branch information
jlapeyre committed Jun 5, 2024
1 parent 855ccea commit a13ee16
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/circuit/src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ impl Operation for StandardGate {
0,
&[(
OperationType::Standard(Self::UGate),
Some(&defparams),
&defparams,
&[0],
)],
FLOAT_ZERO,
Expand Down
3 changes: 1 addition & 2 deletions qiskit/circuit/library/standard_gates/r.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@ def __init__(
*,
duration=None,
unit="dt",
_skip_validation=False,
):
"""Create new r single-qubit gate."""
super().__init__("r", 1, [theta, phi], label=label, duration=duration, unit=unit,
_skip_validation=_skip_validation,)
)

def _define(self):
"""
Expand Down
1 change: 0 additions & 1 deletion test/python/circuit/test_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,6 @@ def test_complex_angle_raises_when_not_supported(self):
ref.r(0, 0, 0)
self.assertEqual(bound, ref)

self.skipTest("Temporarily disabled for #12459")
with self.subTest("binding x to 1 yields complex parameters"):
# RGate does not support complex parameters
with self.assertRaises(CircuitError):
Expand Down

0 comments on commit a13ee16

Please sign in to comment.