fermi-hubbard-vqe

Estimates Fermi-Hubbard ground-state energies using UnitaryLab's VQE workflow with Jordan-Wigner mapping.

18|3|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/unitarylab/quantum-practices --skill fermi-hubbard-vqe-unitarylab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fermi-hubbard-vqe
Source: https://github.com/unitarylab/quantum-practices/tree/main/algorithms/quantum-machine-learning/fermi-hubbard-vqe
Command: npx skills add https://github.com/unitarylab/quantum-practices --skill fermi-hubbard-vqe-unitarylab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, scipy, unitarylab, matplotlib, and includes scripts (resource) components.

What problem does it solve? Computing the ground-state energy of a Fermi-Hubbard model requires correctly mapping fermionic modes to qubits, choosing a variational ansatz, and validating results against exact diagonalization—steps that are error-prone when done manually, especially around qubit endianness and optimizer convergence checks. ## Core Features & Use Cases - Guided VQE Workflow: Runs UnitaryLab's FermiHubbardVQEAlgorithm with Jordan-Wigner mapping, an Ry-Rz COBYLA ansatz, and an exact-energy reference for validation. - Endianness and Convergence Checks: Verifies the q0 least-significant-bit convention via bit-reversal round trips and separates optimizer convergence status from absolute energy error. - Paired-Mode Spin Measurements: Optionally measures magnetic moments using paired-mode correlators with finite-shot standard errors. - Use Case: A quantum computing student wants to reproduce a 2-site Fermi-Hubbard ground-state calculation, compare the variational energy against the exact diagonalization result, and debug why their manual reimplementation violates the variational bound. ## Quick Start Ask the assistant to run the Fermi-Hubbard VQE workflow with L=2, t=1.0, U=4.0, B=1.5, and seed=7, then compare the VQE energy against the exact ground-state energy.

Frequently Asked Questions about fermi-hubbard-vqe

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a Fermi-Hubbard VQE simulation in Python?

Call FermiHubbardVQEAlgorithm().run() with parameters like L=2, t=1.0, U=4.0, B=1.5, layers=5, and seed=7. It returns the VQE energy, exact energy, absolute error, and optimizer status, and you can verify the variational bound with VQE Energy >= Exact Energy - 1e-8.

How does Jordan-Wigner mapping work for the Fermi-Hubbard model?

Jordan-Wigner mapping converts 2L fermionic modes in the order (1 up, 1 down, 2 up, 2 down, ...) into 2L qubits, producing a Pauli Hamiltonian. The open-chain Hamiltonian combines hopping, on-site interaction U, and a Zeeman term -B(n up - n down).

Why does my VQE energy fall below the exact ground-state energy?

A VQE energy below the exact reference minus 1e-8 indicates a bug, since the variational principle forbids it. Check the qubit endianness convention, bit-reversal permutation of the dense Hamiltonian, and mode ordering before changing optimizer settings.

Does COBYLA convergence mean the VQE result is accurate?

No. Optimizer convergence and energy accuracy are separate: use the Optimizer Converged and Optimizer Message fields for termination status, and Absolute Error against the exact energy for accuracy. A converged optimizer can still return a poor variational energy.

What are the limitations of dense Fermi-Hubbard VQE simulation?

Dense exact diagonalization scales as 2^(4L) in memory because the full Fock space of 2L modes is used with no particle-number constraint. This restricts practical runs to small chains such as L=2, and the Ry-Rz ansatz does not preserve particle number.