Double-Bracket Quantum Imaginary Time Evolution (DB-QITE)
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
from db_qite import DB_Sorter
dbq = DB_Sorter(
hamiltonian = H, # hamiltonian: `SparsePauliOp`
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
)
DB-QITE (or QDP-QITE)
from db_qite import DB_QITE # or QDP_QITE
dbq = DB_QITE(
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
random_u0, # boolean. U0 is random or not
)
Run for a range of iterations with plots
DB-sorter
from db_qite import db_sorter_range
runner, results = db_sorter_range(
hamiltonian=H,
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
)
DB-QITE (or QDP-QITE)
from db_qite import db_qite_range # or qdp_qite_range
runner, results = db_qite_range(
hamiltonian=H,
initial_state=None, # or initial state
time_step=.5, # or a list
random_u0=True, # or False
num_steps_range=range(1, 6),
backend="simulator", # or None to detect a qiskit backend
estimate_energy=True, # wether to estimate energy or just prepare the state
shots=1024
)
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.9
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.9.tar.gz | 9.6 kB | Without provenance | Details for db_qite-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| db_qite-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for db_qite-0.0.9-py3-none-any.whl |
Total release size: 21.5 kB
Release files / db_qite-0.0.9.tar.gz
| Download URL | db_qite-0.0.9.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb6ca6feab1e240ff8289acb9d34a6714ef862748df575c11da6b425fe8efb79
|
|
BLAKE2b-256 checksum How to use checksums |
dbeb21b2cdf798cc70f5ee155672251044d335affb9fa2893a1334b4fc6a338b
|
| 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.9-py3-none-any.whl
| Download URL | db_qite-0.0.9-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
961e1d071896150f8342e7a17fa168a5db6c920dc1b6b57dc038be9c225e1639
|
|
BLAKE2b-256 checksum How to use checksums |
4522b84aa29ae9465680a8d7040052577425ce2fb30f61cca3cc98479ee36bc3
|
| 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.9
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.