Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ffsim simulator backend #90

Merged
merged 33 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d5e83d3
add ffsim simulator backend
kevinsung Dec 12, 2023
a8b8b05
fix hop gate sorting
kevinsung Dec 27, 2023
9784d8b
add support for fermiongate
kevinsung Dec 29, 2023
1e4119a
lint
kevinsung Jan 2, 2024
d17f8cc
add ffsim backend to providers
kevinsung Jan 2, 2024
815048d
make ffsim dependency optional
kevinsung Jan 2, 2024
2b7a1a1
remove asv benchmarks
kevinsung Jan 2, 2024
b2219c3
update TODOs
kevinsung Jan 2, 2024
3651e3e
from __future__ import annotations
kevinsung Jan 2, 2024
3cd64dd
add notebook
kevinsung Jan 2, 2024
f35c067
update docs
kevinsung Jan 3, 2024
3c83245
remove TODOs
kevinsung Jan 5, 2024
e066423
Merge branch 'main' into ffsim
kevinsung Jan 6, 2024
f95832d
add support for spinless fermions
kevinsung Jan 1, 2024
3a192cf
test python 3.8 in github actions
kevinsung Jan 8, 2024
dad9245
union keys instead of entire dictionary
kevinsung Jan 8, 2024
f3b69b6
add support for FR{XYZ} gates
kevinsung Jan 9, 2024
2384998
pin ffsim to 0.0.19
kevinsung Jan 10, 2024
28c2cd3
update docs and README
kevinsung Jan 11, 2024
a7963b0
add release note
kevinsung Jan 11, 2024
4ec8f68
document ValueError
kevinsung Jan 11, 2024
97d93e4
Create 10_fermions_spin_charge_sep.ipynb
fretchen Jan 12, 2024
d29299a
Merge branch 'main' into ffsim
kevinsung Jan 12, 2024
1cbcd9d
Update 10_fermions_spin_charge_sep.ipynb
fretchen Jan 13, 2024
3545062
Merged ffsim from other repository
fretchen Jan 13, 2024
01068b3
Update 10_fermions_spin_charge_sep.ipynb
fretchen Jan 13, 2024
5d98981
Update 10_fermions_spin_charge_sep.ipynb
fretchen Jan 16, 2024
02b8833
Merge pull request #1 from Alqor-UG/fermion_spin_charge_sep
kevinsung Jan 29, 2024
c9fa4f5
fix spinless measurements
kevinsung Jan 29, 2024
aed0437
move ffsim tutorial content to tutorial 01
kevinsung Jan 29, 2024
fde76cc
Merge branch 'main' into ffsim
kevinsung Jan 29, 2024
e1eddeb
format
kevinsung Jan 29, 2024
9343b27
just print statevector length instead of all entries
kevinsung Jan 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,29 @@ jobs:
with:
name: html_docs
path: docs/_build/html
ffsim:
name: tests-ffsim-python${{ matrix.python-version }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.11]
os: ["ubuntu-latest", "macOS-latest"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-tests-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-tests-
${{ runner.os }}-${{ matrix.python-version }}-pip-
${{ runner.os }}-${{ matrix.python-version }}
- name: Install Deps
run: python -m pip install -U tox setuptools virtualenv wheel
- name: Run ffsim tests
run: tox -e ffsim
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Here, we extend this concept and allow wires to represent individual internal st
This currently covers two settings, one for fermionic modes and one for spin modes,
demonstrating that a broad range of hardware can be accommodated in Qiskit.

We encourage new users to familiarize themselves with the basic functionalities through the tutorial-style python notebooks in `/docs/tutorials`.
We encourage new users to familiarize themselves with the basic functionalities through the tutorial-style python notebooks in [`docs/tutorials`](docs/tutorials).
These require an environment to execute `.ipynb` notebooks such as jupyter lab.

## Installation
Expand All @@ -30,6 +30,10 @@ or Pypi
```bash
pip install qiskit-cold-atom
```
To install Qiskit Cold Atom with the [ffsim fermion simulator backend](#cold-atomic-circuits) (not supported on Windows), specify the `ffsim` extra in the `pip` install command, e.g.
```bash
pip install "qiskit-cold-atom[ffsim]"
```

## Setting up the Cold Atom Provider
Qiskit Cold Atom includes local simulator backends to explore the cold atomic hardware. In order to access
Expand Down Expand Up @@ -59,10 +63,20 @@ spin_simulator_backend = provider.get_backend("collective_spin_simulator")

## Cold atomic circuits

The circuits that can be run on the cold atomic hardware explored in this project use different gates
from the qubit circuits typically employed in Qiskit, because their systems are described by different
Hilbert spaces.
To see how to define and run gates through quantum circuits in this setting, please refer to the tutorials (in `/docs/tutorials`).
The circuits that can be run on the cold atomic hardware explored in this project use different gates
from the circuits typically employed in Qiskit, because these hardware are not built from qubits,
but from fermions or spins.
Qiskit Cold Atom includes basic simulators for both the fermion and spin settings that can be used
to simulate small circuits. See [Introduction & Fermionic Circuits](docs/tutorials/01_introduction_and_fermionic_circuits.ipynb)
and [Spin circuits](docs/tutorials/02_spin_circuits.ipynb) for tutorials on how to define and run gates through
quantum circuits in these settings.

Qiskit Cold Atom also includes a high-performance simulator for fermionic circuits based on
[ffsim](https://github.com/qiskit-community/ffsim), which can handle much larger circuits than the basic simulator mentioned before. The ffsim simulator is not supported on Windows, and in order
for it to be available, Qiskit Cold Atom must be installed with the `ffsim` extra, e.g.
```bash
pip install "qiskit-cold-atom[ffsim]"
```

## Documentation

Expand Down
121 changes: 104 additions & 17 deletions docs/tutorials/01_introduction_and_fermionic_circuits.ipynb

Large diffs are not rendered by default.