Skip to content

TAM-DS/Quantum-Chemistry-VQE-H2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

VQE H₂ Ground-State Energy Demo

Minimal, reproducible Variational Quantum Eigensolver (VQE) implementation using Qiskit Nature to compute the ground-state energy of the hydrogen molecule (H₂) in the minimal STO-3G basis.

Demonstrates:

  • Full quantum chemistry pipeline: PySCF driver → second-quantized Hamiltonian → Jordan-Wigner mapping → UCCSD ansatz + HartreeFock initial state → VQE optimization
  • Achieving chemical accuracy (~1 mHa or better) compared to exact classical diagonalization

Results

Ansatz / Configuration Optimizer Iterations Energy (Hartree) Error (mHa)
TwoLocal (rz/ry + cz, reps=4) COBYLA 500 -1.624377 228
UCCSD (reps=1) + HF initial SLSQP 1000 -1.852... ~0–1
Exact (classical) -1.8523881735695822 0

Chemical accuracy achieved with UCCSD ansatz — error reduced from 228 mHa to near-zero.

Why This Project?

  • Classic benchmark for quantum chemistry algorithms (H₂ in STO-3G)
  • Shows transition from general-purpose ansatz → chemistry-aware UCCSD for dramatically better convergence
  • Baseline for exploring quantum advantages in molecular simulation, optimization, and related domains (e.g., energy minimization in FinOps models, anomaly detection in quantum-enhanced ML)

Tech Stack

  • Quantum Chemistry: Qiskit Nature 0.7+, PySCFDriver, UCCSD, HartreeFock
  • Algorithms: Qiskit Algorithms (VQE, COBYLA/SLSQP, NumPyMinimumEigensolver)
  • Simulation: qiskit-aer (AerEstimator with V1 compatibility wrapper)
  • Environment: Python 3.10+, Jupyter/Colab

How to Run

  1. Open in Colab:
    Open In Colab

  2. Install dependencies (first cell):

    !pip install qiskit-nature qiskit-aer pyscf qiskit-algorithms --quiet

About

Minimal, reproducible Variational Quantum Eigensolver (VQE) implementation using Qiskit Nature to compute the ground-state energy of the hydrogen molecule (H₂) in the minimal STO-3G basis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors