Skip to main content

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

Brockett Flow DBI Flow

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.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for db-qite 0.0.12
File Size Uploaded Provenance Actions
db_qite-0.0.12.tar.gz 13.9 kB Without provenance Details for db_qite-0.0.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for db-qite 0.0.12
File Interpreter ABI Platform Actions
db_qite-0.0.12-py3-none-any.whl Python 3 none any Details for db_qite-0.0.12-py3-none-any.whl

Total release size: 30.2 kB

Release files / db_qite-0.0.12.tar.gz

Download URL db_qite-0.0.12.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
af79f4ebe172f0c82c7ae5456d882cdca50b03aae348f8ce45e3e50c3c509f62
BLAKE2b-256 checksum
How to use checksums
f89f991a332b5dcd57962a76d850c13d52ae180e76e46f6aee59442207bb105e
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.12-py3-none-any.whl

Download URL db_qite-0.0.12-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e857029a59b0dc56692fedbf5eddff3df1ce999bbecfefd8b6c127c92c8bb8d
BLAKE2b-256 checksum
How to use checksums
a9dbd5767c34486616865e7546c8422a56e3aed21ef09ceb84b573a798171af9
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.12

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page