vqe

Estimate ground-state energies for 2-qubit Ising Hamiltonians using VQE with COBYLA.

30|2|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/unitarylab/quantum-skills --skill vqe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vqe
Source: https://github.com/unitarylab/quantum-skills/tree/main/algorithms/quantum-machine-learning/vqe
Command: npx skills add https://github.com/unitarylab/quantum-skills --skill vqe

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Serves as a practical pathway to estimate ground-state energies for small quantum systems using a variational quantum eigensolver (VQE) in a 2-qubit Ising model.

Core Features & Use Cases

  • Hybrid quantum-classical optimization using COBYLA to minimize energy.
  • Exact energy comparison and circuit visualization for educational exploration.
  • Run-ready demonstrations with a simple 2-qubit Ising Hamiltonian.
  • Use Case: Demonstrate VQE workflows and compare approximate results to exact spectra.

Quick Start

Execute the example script to run a VQE on the 2-qubit Ising model.

Frequently Asked Questions about vqe

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

FAQPage Schema
How do I estimate ground-state energy for a 2-qubit Ising model using VQE?

VQE estimates ground-state energies by running a hybrid quantum-classical loop. A parameterized quantum circuit prepares a trial state, and a classical optimizer like COBYLA adjusts parameters to minimize the measured energy expectation value until convergence.

How does variational quantum eigensolver optimization work for small Hamiltonians?

Variational quantum eigensolver optimization for small Hamiltonians works by combining a quantum circuit simulator with the COBYLA optimizer. It uses an Ry+CX ansatz to prepare trial states and evaluates statevectors to minimize energy for educational demonstrations.

Can I use COBYLA for quantum circuit simulation and ansatz design?

Yes, you can use COBYLA to optimize ansatz parameters in a quantum circuit simulation. This Skill specifically uses COBYLA to minimize energy expectation values derived from an Ry+CX ansatz evaluated via statevector simulation.

What is the best way to compare approximate VQE results to exact energy spectra?

The best way to compare approximate VQE results to exact spectra is to run a small Hamiltonian simulation that outputs both values. This Skill calculates exact ground-state energies alongside VQE optimization results for direct comparison.

Do I need a quantum circuit simulator to run variational quantum eigensolver demonstrations?

Yes, running VQE demonstrations requires a quantum circuit simulator to evaluate the ansatz statevector. This Skill depends on a simulator backend to compute energy expectation values for the Hamiltonian during the optimization loop.

When should I not use a variational quantum eigensolver for quantum computing?

You should not use VQE for large-scale Hamiltonians or systems requiring deep circuits, as the Ry+CX ansatz and COBYLA optimizer here are tailored for small 2-qubit Ising models. It is intended for educational demos, not large-scale research simulations.