Skip to main content

Implements Double-Bracket Quantum Imaginary Time Evolution (DB-QITE) in Qiskit

Project description

Double-Bracket Quantum Imaginary Time Evolution (DB-QITE)

Implementation of DB-QITE (by Gluza et al)

Installation

pip install qiskit-dbqite

Usage

To create a QuantumCircuit

from db_qite import DB_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
)
circuit = dbq.create_circuit(
    num_steps,               # #iterations
    random_u0,               # boolean. U0 is random or not
)

Run for a range of iterations with plots

from db_qite import db_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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

db_qite-0.0.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

db_qite-0.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file db_qite-0.0.1.tar.gz.

File metadata

  • Download URL: db_qite-0.0.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for db_qite-0.0.1.tar.gz
Algorithm Hash digest
SHA256 aa10aa6dc6d3eba68c2e8fd642f41a630fbc1689eb6eb9a6f6e27056496cf73a
MD5 f45455149aae8a6ef9cac72234a077dd
BLAKE2b-256 c697733f3d4d4881c2efa331202f1500a64aaa4186c943fe6834d44e713cb970

See more details on using hashes here.

File details

Details for the file db_qite-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: db_qite-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for db_qite-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c249591c97fcf9d4183b9dd1443ed645cc6a570efd79e3b3da363ec7ea187593
MD5 75429f720aaf3963d4f5b0f7e26b1971
BLAKE2b-256 c0cd2e5f5b706272b6db43e39195f24f4062309337a987a7a4b35715fcb3847d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page