You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 repo
Alternate 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 also hadamard_transform could be shortened to hadamard, but also include the original name.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Thanks @BoxiLi
Okay, embarrassingly, I was still in my update-4,x branch, so hence didn't find the file.
Still, I did try a lot of stuff like from qutip import hadamard_transform (in other envs) that didn't work, before I found (with some help) that from qutip import gates is a good option. It seems like there was a deliberate choice not to expose the function names individually.
A search for "hadamard_transform" or "gates" does not return anything helpful. Does it need pointing at in the docs build?
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: