Skip to content

Handle complex numbers in pulse defaults#694

Closed
mtreinish wants to merge 1 commit into
Qiskit:masterfrom
mtreinish:handle-complex-pulse
Closed

Handle complex numbers in pulse defaults#694
mtreinish wants to merge 1 commit into
Qiskit:masterfrom
mtreinish:handle-complex-pulse

Conversation

@mtreinish
Copy link
Copy Markdown
Member

Summary

In Qiskit/qiskit#4016 the pulse defaults (as well as backend
configuration and properties) were updated to not rely on marshmallow. A
side effect of this change is that the return from to_dict() on pulse
defaults no longer will convert complex -> [real, imag] since this is
typically an unecessary conversion that complicates using the output.
However, the pulse system model class was not handling this as expected
and will fail trying to access the the components from [real, imag].
This commit updates this to handle the case when a complex number is
passed in.

Details and comments

This will be blocked until Qiskit/qiskit#4124 merges.

In Qiskit/qiskit#4016 the pulse defaults (as well as backend
configuration and properties) were updated to not rely on marshmallow. A
side effect of this change is that the return from to_dict() on pulse
defaults no longer will convert complex -> [real, imag] since this is
typically an unecessary conversion that complicates using the output.
However, the pulse system model class was not handling this as expected
and will fail trying to access the the components from [real, imag].
This commit updates this to handle the case when a complex number is
passed in.
@chriseclectic
Copy link
Copy Markdown
Member

I believe this was included in #695

@mtreinish mtreinish deleted the handle-complex-pulse branch April 14, 2020 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants