-
Notifications
You must be signed in to change notification settings - Fork 624
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
Gates in qutip-qutip #2389
Comments
We have kept many gates in qutip/core/gates. Not all of them but surely for cnot, hadamard etc. |
It is actually very similar to your solution. We should add this to the migration guide. |
Thanks @BoxiLi Still, I did try a lot of stuff like A search for "hadamard_transform" or "gates" does not return anything helpful. Does it need pointing at in the docs build? |
That seems true, gates are missing from the documentation. This could be a Good first issue. To add them back to the documentation. |
Hi, I would like to contribute to this issue as part of the UnitaryHack2024. I will incorporate a basic use of gates module to guide-basics.rst and a table of the available gates. |
Problem Description
Now that qutip-qip has moved to another package, gates are not available in the main repo. This is inconvenient for examples such as the control optimization ones, where one would need to install the qutip-qip package just to access say the Hadamard or CNOT for instance.
Proposed Solution
The easiest solution would be just to copy the
gates.py
file from the QIP package into the main repo. Perhaps might confuse imports in qip? Also, I think that file has func defs that refer to 'controls' that might not make sense in this repoAlternate Solutions
Have a file called
operations.py
. Just have a subset of the gates (operations), the most typical named unitaries - sounds less QIP like and would avoid import confusion. I think alsohadamard_transform
could be shortened tohadamard
, but also include the original name.Additional Context
No response
The text was updated successfully, but these errors were encountered: