Double-Bracket Methods for Ground State Preparation
Implementation of DB-QITE (by Gluza et al), QDP-QITE and Ground state by DBI (by Gluza)
This repository implements three recently emerged algorithms for Hamiltonian ground state preparation:
- DB-sorter: Based on DBI algorithm sorts the eigenvalues and eigenvectors and chooses the smallest one
- DB-QITE: Mimics imaginary time evolution by approximating Hamiltonian commutation with
|0><0| - QDP-QITE: Previous algorithm with slower depth growth using Quantum Dynamic Programming method
Installation
pip install db-qite
Usage
To create a QuantumCircuit
DB-sorter (or DB-QITE or QDP-QITE)
from db_qite import DB_Sorter # or DB_QITE or QDP_QITE
dbq = DB_Sorter(
hamiltonian = H, # hamiltonian: `SparsePauliOp`
initial_state = None, # initial_state array-like, default None
time_step = s, # time step. list or a single value
trotterization = True, # whether to approx H, default True
)
circuit = dbq.create_circuit(
num_steps, # #iterations
)
Run for a range of iterations with plots
You can create and run your favorite circuit for a range of s values and create plots
showing how fidelity increases with depth. It can be used for any of db_qite, db_sorter or qdp_qite methods.
from db_qite import db_range_runner
runner, results = db_range_runner(
hamiltonian=H,
initial_state=None, # or initial state
time_step=.5, # or a list
num_steps_range=range(1, 3),
backend=None, # or "simulator" or a Qiskit Backend
estimate_energy=True, # wether to estimate energy or just prepare the state
shots=1024,
method="db_qite",
)
Note: if you provide None, or a qiskit backend name or object, it will run on IBM quantum machines. You have to set IBM_QUANTUM_TOKEN environment variable for it
Metadata
Release files for db-qite 0.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| db_qite-0.0.11.tar.gz | 11.1 kB | Without provenance | Details for db_qite-0.0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| db_qite-0.0.11-py3-none-any.whl | Python 3 | none | any | Details for db_qite-0.0.11-py3-none-any.whl |
Total release size: 24.2 kB
Release files / db_qite-0.0.11.tar.gz
| Download URL | db_qite-0.0.11.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50124cf9dd220d1611c5b95d072d050cf91b10b5ba0a3a364a63514efed37090
|
|
BLAKE2b-256 checksum How to use checksums |
0e6e708b9704d3c2fd063ddfe4866111693c0cfbe4c2bf16fd5c87d2ce66f77e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / db_qite-0.0.11-py3-none-any.whl
| Download URL | db_qite-0.0.11-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1fac936a8aad516ea28ef5d594a67ff35afccfa971819d84a94698175a4e9784
|
|
BLAKE2b-256 checksum How to use checksums |
9ff9d57f17459df0b4c526e7fd4a455e6d1c48ddb0821f446f8ff1311c0df763
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for db-qite 0.0.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.