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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for ffsim-0.0.12-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7d1b53a01d35178bd68a9a1b32ae1e26657c6bf1ee7c04d0856974a88932a2f |
|
MD5 | 5e45e5f12a2452b44b31d9694a343f42 |
|
BLAKE2b-256 | f804811c5b2eab84d85f113b89116797a3e1eaf529266a7110164a98a2fa4004 |
Hashes for ffsim-0.0.12-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fb5f817a88f928e294f2d9771959cfc3fecfe798c6e3e1637797b9f31292f02 |
|
MD5 | da16cfc6419d86feff20568371f39ee4 |
|
BLAKE2b-256 | b38cd0b898d6efec05931cbda0345603c458a34ab66fa4e0d10b34e3493b5030 |