Setting `qutip-qip` as an optional package for qutip-5
See original GitHub issueProblem Description
From version 5.0, the subpackage qutip.qip
will be removed and replaced by a separate package qutip-qip
. To make it easier for others to migrate from 4.7 to 5.0, we can set up qutip-qip
as an optional plug-in for qutip, so that if qutip-qip
is installed, the qutip.qip
name space can be used as before.
Expected behaviour
- If only
qutip
is installed, importingqutip.qip
will raise anImportError
with instruction for installingqutip_qip
. - If
qutip-qip
is installed, usingqutip.qip
will automatically use thequtip_qip
namespace, with no difference in the user interface. - Update
setup.cfg
so thatpip install qutip[qip]
will automatically installqutip_qip
.
E.g. the following should work if qutip
-5.0 and qutip-qip
are both installed
# The following should be the same
from qutip.qip.circuit import QubitCircuit
from qutip_qip.circuit import QubitCircuit
Proposed Solution
See https://github.com/qutip/qutip/discussions/1500 for ideals on the implementation.
Note: The implementation should be done against the dev.major
branch of qutip.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
pdf - QuTiP: Quantum Toolbox in Python
This will install the minimum set of dependences, but none of the optional packages. 2.3.1 Adding the conda-forge channel.
Read more >Functions — QuTiP 4.7 Documentation
Evolve the state vector or density matrix ( rho0 ) using a given Hamiltonian or Liouvillian ( H ) and an optional set...
Read more >Classes — QuTiP 4.7 Documentation
A new instance of qutip. Qobj that contains only the states corresponding to the indices in state_inds . Experimental.
Read more >Source code for qutip.qip.circuit
Source code for qutip.qip.circuit ... e.g [2,2,2,2,2] for 5 qubits system. If None, qubits system will be the default option. num_cbits : int...
Read more >Source code for qutip.qip.compiler.instruction
Gate` The quantum gate. duration: list, optional The execution time needed ... optional The control qubits. used_qubits: set Union of the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just branching from and PRing to
dev.major
– the contribution guidelines are the same.Hey! I’d like to help you out with this, is that okay @nathanshammah @hodgestar ? If there’s a problem with me being a maintainer at Unitaryhack just let me know, no hard feelings of course