Remove complex amp support for ScalableSymbolicPulse#11403
Conversation
|
One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 7480324698
💛 - Coveralls |
nkanazawa1989
left a comment
There was a problem hiding this comment.
Thanks @TsafrirA for taking care of this :)
| ref_obj = pulse.Constant(duration=160, amp=1j * 0.1) | ||
|
|
||
| self.assertEqual(assigned, ref_obj) | ||
| self.assertEqual(assigned.amp, 0.1j) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
With Qiskit's main branch you can save a ScheduleBlock with complex amp.
In #9897 we added a PendingDeprecationWarning for the assignment of complex values. We can promote to deprecation in 0.46 and remove in 1.0 if you want.
nkanazawa1989
left a comment
There was a problem hiding this comment.
LGTM. Just minor fix. Qiskit 1.0 should not contain deprecation warning and I think we need to drop support for parameter assignment of complex values.
Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
|
Thanks @nkanazawa1989 ! |
* Remove complex amp support * QPY compatibility fix * lint * Yet another QPY compatibility fix * Yet another QPY compatibility fix * Yet another QPY compatibility fix * Update qiskit/qpy/binary_io/schedules.py Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com> * Update qiskit/qpy/binary_io/schedules.py Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com> * lynt --------- Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
Summary
Support for complex
ampin the instantiation ofScalableSymbolicPulseis removed.Details and comments
Complex
ampsupport was deprecated in #10357 (with some parts awaiting deprecation with #11257 in the 0.46 branch). This PR removes the support.Pulses with complex
amploaded from old QPY files are automatically converted to (amp,angle) representation (with a user warning). Note that there are three eras with regard to this - complex amp (Terra <0.23), amp,angle with complex amp support (Qiskit < 1.0) and now amp,angle with no complex amp support (Qiskit >= 1.0). QPY version was not bumped, so the "complexity" ofampis tested even for QPY files of Qiskit >=1.0. With the next version of QPY,ampcould be assumed to be real.The QPY compatibility test was updated to reflect the difference in the API, but backwards compatibility is maintained.