Code
qcr:2606.69402.1

Variational Quantum Thermalizer

This PennyLane demo implements the Variational Quantum Thermalizer (VQT), a variational algorithm for preparing the thermal (Gibbs) state of a Hamiltonian at a given temperature, generalizing the ground-state-focused VQE to finite temperature. Thermal states describe systems in equilibrium with a heat bath and are central to studying phase transitions, statistical mechanics, and quantum chemistry at non-zero temperature, but they are mixed states, which makes them harder to prepare than pure ground states. VQT handles this by combining a classical probabilistic model (a parameterized latent distribution over basis states) with a parameterized quantum circuit: the latent distribution provides the classical entropy of the mixed state while the circuit applies the quantum correlations, and the two are trained together to minimize the free energy, balancing energy and entropy so the result approximates the Gibbs state. The tutorial builds this hybrid model in PennyLane, defines the free-energy cost (which requires estimating both energy and entropy), and optimizes it for a sample Hamiltonian, then verifies the prepared state against the exact thermal state. By targeting finite-temperature physics, VQT extends variational methods beyond ground states, demonstrated hands-on in PennyLane.
Quantum Simulation
Qubit
Circuit-based
Uploaded 2 days ago
13
Views
Citing this entry? Use this QCR ID
Uploaded by
QL
QCR Librarian

Overview

PennyLaneAI/demos
667238
README.md

Variational Quantum Thermalizer

This PennyLane demo implements the Variational Quantum Thermalizer (VQT), a variational algorithm for preparing the thermal (Gibbs) state of a Hamiltonian at a given temperature, generalizing the ground-state-focused VQE to finite temperature. Thermal states describe systems in equilibrium with a heat bath and are central to studying phase transitions, statistical mechanics, and quantum chemistry at non-zero temperature, but they are mixed states, which makes them harder to prepare than pure ground states. VQT handles this by combining a classical probabilistic model (a parameterized latent distribution over basis states) with a parameterized quantum circuit: the latent distribution provides the classical entropy of the mixed state while the circuit applies the quantum correlations, and the two are trained together to minimize the free energy, balancing energy and entropy so the result approximates the Gibbs state. The tutorial builds this hybrid model in PennyLane, defines the free-energy cost (which requires estimating both energy and entropy), and optimizes it for a sample Hamiltonian, then verifies the prepared state against the exact thermal state. By targeting finite-temperature physics, VQT extends variational methods beyond ground states, demonstrated hands-on in PennyLane.

Run it

pip install -r requirements.txt
python demo.py

Source and license

Imported from demonstrations_v2/tutorial_vqt/demo.py in PennyLaneAI/demos at c52c0abeb5122218aa96b38eea848864cce7323f, under the Apache License 2.0. Original authors: Xanadu and the PennyLane community. The upstream LICENSE is included alongside this example.

Join the Discussion

Comments (0)

No comments yet. Be the first to share your thoughts!

Indexed by QCR Librarian

This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.

Publication

doi:10.48550/arxiv.1910.02071
Quantum Hamiltonian-Based Models and the Variational Quantum Thermalizer Algorithm

Guillaume Verdon, Jacob Marks, Sasha Nanda, Stefan Leichenauer, Jack Hidary

Versions

v1 Latest
Jun 17, 2026
qcr:2606.69402.1

Cite all versions? Use the base QCR ID to always reference the latest version of this entry.

Tools used

PennyLane

Keywords

vqt
thermal-state
gibbs-state
quantum-simulation
pennylane

You may also like5