Installation Instructions

Caution

The installation process of this package has not been ironed out yet. Thus, for now it is important that you follow these instructions carefully.

Requirements

To compile and install this package, you need to install the following dependencies:

Preparation

Currently, the build process assumes a locally compiled version of Qiskit to be located at build/qiskit. Thus, the following steps are required:

  1. activate your Python environment

  2. (only the first time) clone this repository:

    $ git clone git@github.com:Qiskit/qiskit-fermions.git
    
  3. change into the correct directory:

    $ cd qiskit-fermions
    
  4. (only the first time) clone Qiskit into the desired location:

    $ git clone git@github.com:Qiskit/qiskit.git build/qiskit
    
  5. compile Qiskit locally (first the C API, then the Python package):

    $ cd build/qiskit
    $ make c
    $ pip install -r requirements.txt -c constraints.txt
    $ SETUPTOOLS_RUST_CARGO_PROFILE=release pip install -e .
    
  6. symlink the compiled library (replace * to match your local filename and update the .so suffix if it differs on your platform):

    $ cd qiskit/
    $ ln -s $(realpath _accelerate.*.so) libqiskit.so
    
    $ cd qiskit/
    $ ln -s $(realpath _accelerate.*.so) libqiskit.dylib
    
  7. verify that everything worked by running the qiskit-fermions Rust tests:

    $ cd ../../..
    $ make testrust
    

Assuming everything above worked, you can now proceed with installing the C and Python APIs for this package!