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

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.10
File Size Uploaded Provenance Actions
db_qite-0.0.10.tar.gz 10.7 kB Without provenance Details for db_qite-0.0.10.tar.gz

Built distribution (wheel)

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

Total release size: 23.3 kB

Release files / db_qite-0.0.10.tar.gz

Download URL db_qite-0.0.10.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c8bba81de99d7482336a8edb989df7d7aaa157da61eef39f50fc1094f35d5775
BLAKE2b-256 checksum
How to use checksums
d8c44256c6bcfbb753c19ea3c5a6fb57f841f15f0905a8af94d90326ebef2810
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.10-py3-none-any.whl

Download URL db_qite-0.0.10-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8886ac277f2fc030a6e29ea602e96d7b2983c09026832a6e0ad866dc55f097b5
BLAKE2b-256 checksum
How to use checksums
c1cfd4f6c333e70ef57d1620c16d01beed906de0ae7d651bbbb1703d41d5143c
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.10

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