question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting `qutip-qip` as an optional package for qutip-5

See original GitHub issue

Problem 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, importing qutip.qip will raise an ImportError with instruction for installing qutip_qip.
  • If qutip-qip is installed, using qutip.qip will automatically use the qutip_qip namespace, with no difference in the user interface.
  • Update setup.cfg so that pip install qutip[qip] will automatically install qutip_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:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hodgestarcommented, Jun 6, 2022

Does this entail any extra steps not encompassed in the contributing guidelines, or is it just a matter of branching from and PRing to dev.major instead of master?

Just branching from and PRing to dev.major – the contribution guidelines are the same.

1reaction
HGSilvericommented, Jun 6, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found