-
Notifications
You must be signed in to change notification settings - Fork 3k
Remove complex amp support for ScalableSymbolicPulse
#11403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
9b32041
e5fba86
669e80a
88d131f
09c4a69
2b66483
08749a1
2a57fc0
dc951db
66701c0
6465846
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -353,10 +353,7 @@ def test_complex_valued_parameter(self): | |
| with self.assertWarns(PendingDeprecationWarning): | ||
| assigned = visitor.visit(test_obj) | ||
|
|
||
| with self.assertWarns(DeprecationWarning): | ||
| ref_obj = pulse.Constant(duration=160, amp=1j * 0.1) | ||
|
|
||
| self.assertEqual(assigned, ref_obj) | ||
| self.assertEqual(assigned.amp, 0.1j) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like this is confusing because we can still use complex valued amplitude through parameterization (because this bypasses validation in the constructor). We can probably drop validation in the constructor and let user use valid amplitude value on their responsibility. Note that this pulse will fail in execution anyways because QPY doesn't take complex value, right? I think this test doesn't really make sense.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With Qiskit's main branch you can save a In #9897 we added a |
||
|
|
||
| def test_complex_value_to_parameter(self): | ||
| """Test complex value can be assigned to parameter object, | ||
|
|
@@ -370,10 +367,7 @@ def test_complex_value_to_parameter(self): | |
| with self.assertWarns(PendingDeprecationWarning): | ||
| assigned = visitor.visit(test_obj) | ||
|
|
||
| with self.assertWarns(DeprecationWarning): | ||
| ref_obj = pulse.Constant(duration=160, amp=1j * 0.1) | ||
|
|
||
| self.assertEqual(assigned, ref_obj) | ||
| self.assertEqual(assigned.amp, 0.1j) | ||
|
|
||
| def test_complex_parameter_expression(self): | ||
| """Test assignment of complex-valued parameter expression to parameter, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.