Skip to main content

Quantum Simulation Suite with VQE, QPE, and QITE modules (PennyLane-based)

Project description

Quantum Simulation Suite โ€” VQE, Excited-State Methods, QPE, VarQITE, and VarQRTE (PennyLane)

PyPI Version PyPI Downloads Tests Python Versions License

A modular quantum simulation framework built on PennyLane, combining:

  • variational eigensolvers (ground and excited states)
  • quantum phase estimation (QPE)
  • variational imaginary-time evolution (VarQITE)
  • variational real-time evolution (VarQRTE)

The project provides a reproducible research environment with:

  • unified molecule and Hamiltonian infrastructure
  • deterministic caching via run signatures
  • shared plotting and output conventions
  • CLI workflows and Python APIs
  • curated notebooks for benchmarking and demonstrations

Implemented Algorithms

Variational methods

  • VQE โ€” ground-state eigensolver
  • ADAPT-VQE โ€” adaptive ansatz growth

Post-VQE excited-state methods

  • LR-VQE
  • EOM-VQE
  • QSE
  • EOM-QSE

Variational excited-state solvers

  • SSVQE
  • VQD

Non-variational algorithms

  • QPE
  • QITE / VarQITE
  • QRTE / VarQRTE

Documentation

Documentation is structured in two layers.

Core (user-facing)

File Purpose
README.md overview and quickstart
USAGE.md CLI and Python workflows
THEORY.md algorithms and derivations
notebooks/README_notebooks.md notebook guide

Start here:


Extended documentation (more_docs/)

Deeper technical and architectural material.

Path Purpose
more_docs/architecture.md system design and module interactions
more_docs/vqe/ VQE workflows and implementation details
more_docs/qpe/ time evolution and phase estimation
more_docs/qite/ projected-dynamics derivations and internals

Intended for:

  • contributors
  • advanced users
  • algorithm deep dives beyond THEORY.md

Repository Structure

Variational_Quantum_Eigensolver/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ THEORY.md
โ”œโ”€โ”€ USAGE.md
โ”œโ”€โ”€ pyproject.toml
โ”‚
โ”œโ”€โ”€ more_docs/
โ”‚   โ”œโ”€โ”€ architecture.md
โ”‚   โ”œโ”€โ”€ vqe/
โ”‚   โ”œโ”€โ”€ qpe/
โ”‚   โ””โ”€โ”€ qite/
โ”‚
โ”œโ”€โ”€ vqe/        # variational + excited-state solvers
โ”œโ”€โ”€ qpe/        # quantum phase estimation
โ”œโ”€โ”€ qite/       # projected variational dynamics (VarQITE / VarQRTE)
โ”‚
โ”œโ”€โ”€ common/     # shared chemistry + infrastructure
โ”‚
โ”œโ”€โ”€ notebooks/  # demonstrations and benchmarks
โ”‚   โ”œโ”€โ”€ getting_started/
โ”‚   โ””โ”€โ”€ benchmarks/
โ”œโ”€โ”€ results/    # cached runs (gitignored)
โ””โ”€โ”€ images/     # generated plots (gitignored)

Design principles

  • shared chemistry + Hamiltonian layer (common/)
  • consistent run signatures across all solvers
  • deterministic caching for reproducibility
  • CLI and Python APIs backed by identical core logic
  • minimal configuration friction for common workflows

Installation

From PyPI

pip install vqe-pennylane

From source

git clone https://github.com/SidRichardsQuantum/Variational_Quantum_Eigensolver.git
cd Variational_Quantum_Eigensolver
pip install -e .

Verify

python -c "import vqe, qpe, qite, common; print('Quantum stacks imported successfully')"

Core Infrastructure

Shared modules used across all solvers.

Module Purpose
common/molecules.py molecule definitions
common/geometry.py coordinate generation
common/hamiltonian.py Hamiltonian construction
common/plotting.py plot + filename standardisation
common/persist.py deterministic run hashing
common/paths.py output directory structure

Provides:

  • consistent Hamiltonians across algorithms
  • reproducible experiment signatures
  • standardised output locations

VQE Package

Ground-state and excited-state workflows.

Capabilities

  • VQE, ADAPT-VQE
  • LR-VQE, EOM-VQE
  • QSE, EOM-QSE
  • SSVQE, VQD
  • noise support
  • geometry scans

Canonical entrypoint

from vqe.core import run_vqe

res = run_vqe(
    molecule="H2",
    ansatz_name="UCCSD",
    optimizer_name="Adam",
    steps=50,
)

print(res["energy"])

QPE Package

Quantum Phase Estimation using shared Hamiltonians.

Features

  • Trotterized time evolution
  • inverse QFT
  • noisy and noiseless execution
  • cached runs

Canonical entrypoint

from common.hamiltonian import build_hamiltonian
from qpe.core import run_qpe

H, n_qubits, hf_state = build_hamiltonian("H2")

res = run_qpe(
    hamiltonian=H,
    hf_state=hf_state,
    n_ancilla=4,
)

print(res["energy"])

QITE / Projected-Dynamics Package

Imaginary-time evolution via the McLachlan variational principle.

Capabilities

  • variational imaginary-time updates
  • convergence tracking
  • cached trajectories
  • optional noisy evaluation

Canonical entrypoint

from qite.core import run_qite

res = run_qite(
    molecule="H2",
    ansatz_name="UCCSD",
    steps=50,
    dtau=0.2,
)

print(res["energy"])

Command-Line Interface

VQE

python -m vqe -m H2 -a UCCSD -o Adam --steps 50

QPE

python -m qpe --molecule H2 --ancillas 4 --shots 2000

QITE

python -m qite run --molecule H2 --steps 50 --dtau 0.2

Full workflows:

โš™๏ธ USAGE.md


Reproducibility

All solvers share:

  • deterministic configuration hashing
  • standardised result storage
  • consistent naming conventions
  • cached experiment reuse

Outputs are stored under:

results/<module>/
images/<module>/<MOLECULE>/

Testing

pytest -v

Tests cover:

  • core algorithm execution
  • Hamiltonian construction
  • CLI workflows
  • smoke tests for packaged interfaces

Author

Sid Richards

LinkedIn: https://www.linkedin.com/in/sid-richards-21374b30b/

GitHub: https://github.com/SidRichardsQuantum


License

MIT License โ€” see LICENSE

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

vqe_pennylane-0.3.8.tar.gz (116.3 kB view details)

Uploaded Source

Built Distribution

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

vqe_pennylane-0.3.8-py3-none-any.whl (109.6 kB view details)

Uploaded Python 3

File details

Details for the file vqe_pennylane-0.3.8.tar.gz.

File metadata

  • Download URL: vqe_pennylane-0.3.8.tar.gz
  • Upload date:
  • Size: 116.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for vqe_pennylane-0.3.8.tar.gz
Algorithm Hash digest
SHA256 756857fcd6478ac45053fed8ab5ffdceb8f6eb62d74909901796659a1f6dbbe4
MD5 834d141feac606234bada1b9e78793c8
BLAKE2b-256 864fc217c913fc541526c112d7f933c6034cacf531f2da5b5af07356269fc085

See more details on using hashes here.

File details

Details for the file vqe_pennylane-0.3.8-py3-none-any.whl.

File metadata

  • Download URL: vqe_pennylane-0.3.8-py3-none-any.whl
  • Upload date:
  • Size: 109.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for vqe_pennylane-0.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3be3a0430e2176ee31208739441a12ba229f5b9f555f8a8843344c04412a4d22
MD5 bd7546c1f926881b418594532f325596
BLAKE2b-256 cf59643f62e485612ff7f4836f517830423f99b4c4820863d84f4ab798f39631

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