No project description provided
Project description
QUARK-plugin-hamiltonian-simulation
This is a QUARK plugin that implements hamiltonian simulation benchmarks. It should be used within the QUARK framework
See the directory config_examples for usage examples.
Run a benchmark config using:
quark -c <config_file>
Benchmarks
The descriptions of the benchmarks implemented within this QUARK plugin and their configuration APIs are given below.
Example benchmark configurations can be found in config_examples.
Free Fermion Benchmark
Benchmark for Hamiltonian dynamics in fermionic systems. See publication Phys. Rev. Research 7, 043146 (2025).
The system considered is a square lattice with width and height lx and ly, with open or periodic boundary conditions, as determined by periodic, and with one or two species of fermions, as determined by two_spin_species. The Hamiltonian contains tight-binding hopping terms for all neighbouring sites on the lattice. The initial state is a product state with a disk of sites at the center of the lattice filled with fermions, while the other sites are empty. The system is evolved with the Hamiltonian for n_trot Trotter steps of size dt. One measures the fermion occupation number on all sites with n_shots shots, computes the imbalance of fermions inside versus outside the initial disk, namely the density of fermions within the initial disk minus the density outside the initial disk, and compares it to the exact value. The reported score is the minimal number of two-qubit gates that an ideal quantum computer would have to run to detect an error in the output of the tested hardware at the level of 3 standard deviations. create_plot determines whether plots of the imbalance are generated at the end of the benchmark.
Pipeline step name: free_fermion_benchmark
Defined in free_fermion_benchmark.py.
| Parameter | Type | Default | Description |
|---|---|---|---|
lx |
int |
2 |
Number of lattice sites in the x direction. |
ly |
int |
2 |
Number of lattice sites in the y direction. |
periodic |
bool |
False |
Whether to use periodic boundary conditions. |
two_spin_species |
bool |
False |
Whether to include two spin species in the model. |
create_plot |
bool |
False |
Whether to display result plots and stabilizer histograms during postprocessing. |
n_trot |
int |
2 |
Number of Trotter steps. |
n_shots |
int |
200 |
Number of shots used for each generated circuit. |
dt |
float |
0.5 |
Trotter time step. |
Example:
- "free_fermion_benchmark": {lx: 4, ly: 4, periodic: false, n_trot: 4, two_spin_species: false, create_plot: true}
Spectral Function Benchmark
Benchmark for Hamiltonian dynamics in fermionic systems and the Fermionic Fourier Transform. See publication arXiv:2605.01440.
The system considered is two coupled chains of size l with periodic boundary conditions, for one fermion species. The Hamiltonian contains tight-binding hopping terms on the first chain, together with a coupling epsilon between the first chain and the second chain. The first chain is initialized in the ground state of the tight-binding hopping terms with a Fermionic Fourier Transform (FFT). The first and second chains are then evolved for n_trot Trotter steps of size dt. An FFT is performed on the second chain, and the density of fermions is measured there with n_shots shots. The output is related to the spectral function of the tight-binding terms on the first chain at a given frequency. The benchmark runs l different frequency values. Three scores are reported: the fidelity between all measured and exact values, the fidelity with the dispersion relation obtained for a noiseless implementation, and the fidelity with the exact dispersion relation. Three modes are available for the compilation of the FFT, determined by mode, with CZ_pyramid involving only nearest-neighbour sites, CX_ladder minimizing the number of two-qubit gates, and log2N minimizing the two-qubit gate depth. create_plot determines whether plots of the spectral function are generated at the end of the benchmark.
Pipeline step name: spectral_function_benchmark
Defined in spectral_function.py.
| Parameter | Type | Default | Description |
|---|---|---|---|
l |
int |
8 |
System size parameter used by the benchmark circuits. |
dt |
float |
0.5 |
Trotter time step. |
n_trot |
int |
10 |
Number of Trotter steps. |
n_shots |
int |
200 |
Number of shots used for each generated circuit. |
mode |
str |
"log2N" |
Circuit construction mode. Accepted values are "log2N", "CZ_pyramid", and "CX_ladder". |
create_plot |
bool |
False |
Whether to display the measured and exact spectral-function plots during postprocessing. |
epsilon |
float |
np.pi * 0.8 / (n_trot * dt) |
Coupling parameter used to build the circuit sequence. |
Example:
- "spectral_function_benchmark": {l: 8, n_trot: 10, dt: 0.5, epsilon: 0.5, n_shots: 100, mode: "log2N", create_plot: true}
Thermal Adiabatic Square Ising Benchmark
Benchmark for state preparation and Hamiltonian dynamics in spin systems. See publication arXiv:2509.05206.
The system considered is a square lattice with width and height lx and ly, and with periodic or open boundaries, as determined by periodic. The Hamiltonian is an Ising model on this lattice, with XX coupling and Z magnetic field h. The benchmark performs an adiabatic evolution from the ground state of the Hamiltonian containing only an X field on all sites to the target Ising model, using n_trot Trotter steps with time steps scaled by a factor dt. The benchmark runs two types of circuits: one starting from the ground state of the X field and one starting from first excited states with one qubit flipped, in order to compute a derivative of energy with respect to the initial entropy. It then runs additional mirror circuits that are used to estimate the amount of entropy injected by noise in the system. The benchmark outputs the energy of the state obtained, its entropy, and its effective temperature, calculated as explained in the reference. The generated circuits are all run with shot allocations derived from n_shots and the total number of shots run including all circuit types is four times n_shots (with a slight deviation possible due to rounding of allocations to an integer).
Pipeline step name: thermal_adiabatic_square_ising
Defined in thermal_adiabatic_square_ising.py.
| Parameter | Type | Default | Description |
|---|---|---|---|
lx |
int |
2 |
Number of lattice sites in the x direction. |
ly |
int |
2 |
Number of lattice sites in the y direction. |
h |
float |
1 |
Transverse-field parameter. |
periodic |
bool |
False |
Whether to use periodic boundary conditions. |
dt |
float |
0.2 |
Trotter time step. |
n_trot |
int |
2 |
Number of Trotter steps. |
n_shots |
int |
200 |
Number of shots used for each generated circuit. |
Example:
- "thermal_adiabatic_square_ising": {lx: 4, ly: 4, periodic: false, n_trot: 10, h: 2, dt: 0.2}
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quark_plugin_hamiltonian_simulation-0.0.2.tar.gz.
File metadata
- Download URL: quark_plugin_hamiltonian_simulation-0.0.2.tar.gz
- Upload date:
- Size: 200.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d8cf8a46e34b780a652c5b121d156eec3db17095bb832af89c3d33afecc211c
|
|
| MD5 |
9d6e44bf01b0c3af984d81c66b6c0cbc
|
|
| BLAKE2b-256 |
f8b94c9ccfc96562fea812e43b7b2f6e22850971a145170c07ac725a15a81c04
|
Provenance
The following attestation bundles were made for quark_plugin_hamiltonian_simulation-0.0.2.tar.gz:
Publisher:
release.yml on Quantinuum/QUARK-plugin-hamiltonian-simulation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quark_plugin_hamiltonian_simulation-0.0.2.tar.gz -
Subject digest:
7d8cf8a46e34b780a652c5b121d156eec3db17095bb832af89c3d33afecc211c - Sigstore transparency entry: 1940833539
- Sigstore integration time:
-
Permalink:
Quantinuum/QUARK-plugin-hamiltonian-simulation@34edec88e3541c7701dfba0bf284503d80044263 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/Quantinuum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@34edec88e3541c7701dfba0bf284503d80044263 -
Trigger Event:
release
-
Statement type:
File details
Details for the file quark_plugin_hamiltonian_simulation-0.0.2-py3-none-any.whl.
File metadata
- Download URL: quark_plugin_hamiltonian_simulation-0.0.2-py3-none-any.whl
- Upload date:
- Size: 40.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d78fbff7d0f139cd6e4f1e1f7a3c42e72a2006815c778eb96b03cc6635a8b4b
|
|
| MD5 |
09a2ffdd4689a8cfccdee8f5bff3362a
|
|
| BLAKE2b-256 |
7ca9f47c48201799f387125d8136efef21868e1dc9d0a454a8c834b0b3f19f4e
|
Provenance
The following attestation bundles were made for quark_plugin_hamiltonian_simulation-0.0.2-py3-none-any.whl:
Publisher:
release.yml on Quantinuum/QUARK-plugin-hamiltonian-simulation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quark_plugin_hamiltonian_simulation-0.0.2-py3-none-any.whl -
Subject digest:
7d78fbff7d0f139cd6e4f1e1f7a3c42e72a2006815c778eb96b03cc6635a8b4b - Sigstore transparency entry: 1940833637
- Sigstore integration time:
-
Permalink:
Quantinuum/QUARK-plugin-hamiltonian-simulation@34edec88e3541c7701dfba0bf284503d80044263 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/Quantinuum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@34edec88e3541c7701dfba0bf284503d80044263 -
Trigger Event:
release
-
Statement type: