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

Adding Tutorials for Circuit Renderers #102

Merged
merged 13 commits into from
Dec 6, 2024
Merged

Conversation

gadhvirushiraj
Copy link
Contributor

@gadhvirushiraj gadhvirushiraj commented Aug 22, 2024

New Renderer Tutorials

GSOC'24 Project - QuTiP: Enhanced Quantum Circuit Diagrams

TextRenderer Tutorial
MatRenderer Tutorial

@gadhvirushiraj gadhvirushiraj marked this pull request as ready for review September 20, 2024 05:04
@BoxiLi
Copy link
Member

BoxiLi commented Sep 24, 2024

Why does this not trigger any tests... I remember there were tests waiting for approval when it was created. Now they disappear.

@BoxiLi
Copy link
Member

BoxiLi commented Sep 24, 2024

@gadhvirushiraj Could you maybe push something, e.g. add a qutip.about() as the last cell just to try triggering the tests again?

@gadhvirushiraj
Copy link
Contributor Author

gadhvirushiraj commented Sep 25, 2024

Is qc.add_1q_gate() still supported to add gates across all present qubits in circuit? It used to work earlier, though showing some error now. I have removed it from current tutorial examples.

@BoxiLi
Copy link
Member

BoxiLi commented Sep 27, 2024

It should be supported, but I did remember making some changes on that a few weeks ago. Maybe something went wrong. What was the error?

@nwlambert
Copy link
Member

@gadhvirushiraj if you update your branch the tests should now run. some of the plotting stuff in old qip plotting examples now fail and need updating to the new draw() method. I tried in the other PR but these produced additional issues, so maybe better you check here (one had trouble parsing a latex label, and the other failed completely).

@gadhvirushiraj
Copy link
Contributor Author

This should work after qutip/qutip-qip#257 merge.

@nwlambert
Copy link
Member

these look good now. thanks rushi. for the v4 failing test, maybe we need to fix the numpy test environment to 1.20 or lower?

@nwlambert
Copy link
Member

Sorry rushi, that seemed to make things worse. can you revert that change to the numpy version, and I will see if I can produce the original problem locally.

@gadhvirushiraj
Copy link
Contributor Author

gadhvirushiraj commented Nov 18, 2024

Sorry rushi, that seemed to make things worse. can you revert that change to the numpy version, and I will see if I can produce the original problem locally.

@nwlambert I have reverted the changes, but I previously verified that np.complex (used internally) has been deprecated starting with version 1.20, as you mentioned. I believe we also need to use python 3.9 to ensure compatibility with numpy. https://numpy.org/doc/2.0/release/1.21.2-notes.html

@nwlambert
Copy link
Member

nwlambert commented Nov 19, 2024

I think we can just fix it by using the right dtype in the notebook, mat = np.zeros((4, 4), dtype=complex) on line 421 in quantum-gates.md

@nwlambert
Copy link
Member

latest jax release (0.4.36) breaks something in qutip-jax, but v4 tests are finally running, so will merge

@nwlambert nwlambert merged commit e6ac5f6 into qutip:main Dec 6, 2024
2 of 3 checks passed
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.

3 participants