Closed karalekas closed 3 years ago
@purva-thakre Welcome! Thanks for the interest :) in the mitiq
source there are various imports from Qiskit libraries, as you noticed. In addition to Aer, the imports that seem to come from just qiskit
(e.g. QuantumCircuit
) are most likely from qiskit-terra
(see https://github.com/Qiskit/qiskit-terra/blob/master/qiskit/circuit/quantumcircuit.py for example). Thus, my hunch is that qiskit-aer
and qiskit-terra
are the only two that we depend on directly. You could test this by installing just those two libraries and verifying that the test suite still runs without error. Let me know if that makes sense!
Ok. thanks !
Sorry. I accidentally deleted my previous comment. I was trying to edit it.
@purva-thakre Welcome to the v0.4.0
milestone! :)
In addition to qiskit-aer
and qiskit-terra
, qiskit-ibmq-provider
is also needed. I'll check for more.
I imagine these are the only ones. If we rely on aqua something's gone terribly wrong :sweat_smile:
Putting this on hold until a better version of pip's dependency resolver is released. Currently pip backtracks over all older versions of a package. See https://github.com/unitaryfund/mitiq/pull/485#discussion_r551542320
@rmlarose I think you could re-open this issue. There's no checks being run for Python 3.6 in Github workflows. So, maybe the pip dependency resolver will not get stuck.
Great, thanks @purva-thakre! Setting up requirements takes about 2 minutes in CI now, so if we save time on this that would be great.
Issue Description
Right now, we have
qiskit
in therequirements.txt
file, as it is an optional third-party integration. This is a "meta" package that just installs other Qiskit libraries. For example, this is what is installed when you dopip install qiskit
as of today:This is likely more than we need to run Mitiq, and additionally makes
import mitiq
quite slow. The goal of this issue is to only install the Qiskit packages we really need inrequirements.txt
.