Skip to main content

Faster simulations of fermionic quantum circuits.

Project description

ffsim

Faster simulations of fermionic quantum circuits.

What is ffsim?

ffsim is a software library for simulating fermionic quantum circuits that conserve particle number and the Z component of spin. This category includes many quantum circuits used for quantum chemistry simulations. By exploiting the symmetries and using specialized algorithms, ffsim can simulate these circuits much faster than a generic quantum circuit simulator.

Experimental disclaimer: ffsim is currently an experimental release. Breaking changes may be introduced without warning.

Documentation

Documentation is located at the project website.

Supported platforms

ffsim is supported on Linux, macOS, and the Windows Subsystem for Linux (WSL). It is not supported on Windows.

Installation

From PyPI

ffsim is available on PyPI. It can be installed by running the command

pip install ffsim

From source

Installing ffsim from source requires the following system dependencies:

  • A Rust compiler. See these instructions.
  • A BLAS implementation.
    • On macOS, ffsim uses the Accelerate framework that is included with the operating system, so no action is required.
    • On Linux, ffsim uses OpenBLAS. You may be able to install it using your system package manager:
      • Arch Linux:

        sudo pacman -S blas-openblas
        
      • Fedora:

        sudo dnf install openblas-devel
        
      • Ubuntu:

        sudo apt install libopenblas-dev
        

Once these dependencies are satisfied, ffsim can be installed by running the command

pip install .

from the root directory of the code repository.

Development

To set up ffsim for development, install it from source in editable mode along with the development requirements:

pip install -e ".[dev]"

If you add or modify any Rust modules, rebuild them by running the command

maturin develop

If you are benchmarking the code, then pass the --release flag:

maturin develop --release

Tests and other code checks are managed using tox. To run the default tox environments, simply run

tox

To run a specific environment, for example, to run the lint checks, do

tox run -e lint

You can also use pytest to run the tests directly. For example,

pytest tests/

Cite ffsim

You can cite ffsim using the following BibTeX:

@software{ffsim,
  author = {{The ffsim developers}},
  title = {ffsim},
  url = {https://github.com/qiskit-community/ffsim}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ffsim-0.0.11.tar.gz (91.5 kB view details)

Uploaded Source

Built Distributions

ffsim-0.0.11-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ x86-64

ffsim-0.0.11-cp38-abi3-macosx_10_9_x86_64.whl (529.7 kB view details)

Uploaded CPython 3.8+ macOS 10.9+ x86-64

File details

Details for the file ffsim-0.0.11.tar.gz.

File metadata

  • Download URL: ffsim-0.0.11.tar.gz
  • Upload date:
  • Size: 91.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for ffsim-0.0.11.tar.gz
Algorithm Hash digest
SHA256 ec9b69d8c713619a69bfb904092075bb1447b25b8a12067b8787cef77c370aca
MD5 7d7c02cce27152e68b61a02e356fbe0e
BLAKE2b-256 64b18d2a4d880ddefd1e50489e13fd899e484515443ae7135b5b942c685287eb

See more details on using hashes here.

Provenance

File details

Details for the file ffsim-0.0.11-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ffsim-0.0.11-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 41ce4b70d07d3f7f4642bf3e3fe726423662ca2b3959e4d66b1d5f0cd36c3bbc
MD5 e0ee49eae8d76eb1ae5c8e84b45746f8
BLAKE2b-256 3f70805d12984272a90e4c95e117a2241eaa9bed6fccd9cae1df55319455b205

See more details on using hashes here.

Provenance

File details

Details for the file ffsim-0.0.11-cp38-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ffsim-0.0.11-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5fc466b1251dd6432bed4850c9e10da3391f29731097efb86f5ac5e933112012
MD5 d440e3576147c81760dd996adf0d1380
BLAKE2b-256 dadf1bcc3d5959401aa31b4f237e83209c687c6868a8c57c39e124f6fed1aea7

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page