Skip to content
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

Improve plotting and add pulse_mode #1446

Merged
merged 3 commits into from
Mar 24, 2021

Conversation

BoxiLi
Copy link
Member

@BoxiLi BoxiLi commented Feb 17, 2021

Description

  • The plotting method is made more robust.
  • Add pulse_mode as a wrapper for spline_kind, for discrete and continuous pulses. They are more friendly names for experimentalists.
  • Add num_qubits as a replacement for N. In QuTiP capital letter are used for operators, like H for Hamiltonian. Due to historical reason, N is used in qip for the number of qubits. We would like to replace it with num_qubits in qutip_qip. Start from this wrapper and promoting the usage of this in notebooks guide.

Changelog
Minor

@BoxiLi BoxiLi force-pushed the improve_plotting_and_add_pulse_mode branch from b4b05c8 to e501054 Compare February 17, 2021 21:36
@BoxiLi BoxiLi marked this pull request as ready for review February 17, 2021 21:40
@BoxiLi BoxiLi added the qip about the qip submodule label Feb 17, 2021
@coveralls
Copy link

coveralls commented Feb 17, 2021

Coverage Status

Coverage decreased (-0.08%) to 63.125% when pulling c0a565c on BoxiLi:improve_plotting_and_add_pulse_mode into c1e05a7 on qutip:master.

qutip/qip/device/processor.py Outdated Show resolved Hide resolved
qutip/qip/device/processor.py Outdated Show resolved Hide resolved
qutip/qip/device/processor.py Outdated Show resolved Hide resolved
qutip/qip/device/processor.py Show resolved Hide resolved
Use Scipy interpolation for plotting
@BoxiLi BoxiLi force-pushed the improve_plotting_and_add_pulse_mode branch 2 times, most recently from c97bc44 to 0a1dc93 Compare February 19, 2021 17:06
A wrapper for spline_kind, using discrete and continuous instead of steup_func and cubic.
In QuTiP capital letter are used for operators, like H. Due to historical reason, N is used in qip for number of qubits. We would like to replace it with num_qubits in qutip_qip. Start from this wrapper.
@BoxiLi BoxiLi force-pushed the improve_plotting_and_add_pulse_mode branch from 0a1dc93 to c0a565c Compare March 24, 2021 11:38
Comment on lines +852 to +853
if i == 0 and j == 0 and title is not None:
ax.set_title(title)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could remain outside the loop, but probably just personal preference:

for i, label_group in ...:
    [plotting stuff]
if axis and title:
    axis[0].set_title(title)

Is there a reason it only sets the title for one axis? I'm sure there is, just I don't see it immediately.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed this is on purpose, n axes are arranged in a column and they need only one title. It can also be down with fig I guess but I think set the title for axis[0] is safer for the position of the title.

Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Quantum devices: Pulse level control, noise description and error mitigation automation moved this from In progress to Reviewer approved Mar 24, 2021
@BoxiLi
Copy link
Member Author

BoxiLi commented Mar 24, 2021

There is a failing test for mesolve coeff, which I don't think is relevant to this PR.
And another test failing in test_zheevr.

@jakelishman
Copy link
Member

I never saw the test failure in test_zheevr. That's odd - I thought we'd merged a change that fixed that. I certainly haven't seen one for a very long time personally - it's all test_diag_liou_mult.

@BoxiLi BoxiLi merged commit f7bc01b into qutip:master Mar 24, 2021
@jakelishman jakelishman added this to the QuTiP 4.6 milestone Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qip about the qip submodule
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants