Install the Python API¶
Warning
Windows is not yet fully supported by the qiskit-fermions Python API.
We are actively working on resolving this. Stay tuned for updates!
Requirements¶
Qiskit must be installed in the same Python environment that you
install qiskit-fermions in. The simplest way to do this is from
PyPI, but you can install Qiskit from source if you want to.
$ pip install qiskit
Steps¶
Assuming that you have already installed Qiskit into your Python environment (see here), the remaining installation process is fairly simple:
Ensure that you are in the right directory:
$ cd path/to/qiskit-fermions
Install the Python installation tooling:
$ pip install --group build
Install the
qiskit-fermionsPython package into your environment with--no-build-isolationto ensure thatqiskitis available:$ pip install --no-build-isolation .
Hint
You can also perform an editable install while still compiling the underlying Rust crate in
releasemode:$ SETUPTOOLS_RUST_CARGO_PROFILE=release pip install --no-build-isolation -e .
(optional) Verify that the installation was successful: The simplest test is to try and import one of the classes provided by the
qiskit-fermionspackage, for example like so:$ python -c "from qiskit_fermions.circuit import FermionicCircuit"
If this completes successfully, your installation worked.
Hint
If you have performed an editable install, you can also run the entire Python test suite:
$ pip install --group test $ make testpython