15 December , 2025

Quantum Computing for Condensed Matter Physics

In this blog post we want to encourage the use of quantum computing in the field of quantum many body physics. This post is published in the context of the QUICS project, which is a joint project of the Gesellschaft für wissenschaftliche Datenverarbeitung Göttingen, the Leibniz University Hannover and the Physikalisch-Technische Bundesanstalt. QUICS provides low-threshold access to Small and Medium Enterprises (SMEs) to test different use cases on different quantum hardware and software. For this purpose, we present the Openfermion Python library. The main goal of this library is to bridge the gap between quantum algorithm developers and quantum chemists and physicists. They intend to facilitate the development of algorithms for quantum simulations by bringing these groups together. In this library, one can easily describe a molecule or a problem’s Hamiltonian such that one can use quantum simulators via library plugins to study properties of the quantum system. If you want to now more about this library, look into their release paper.

In this blog post, we focus on condensed matter physics, where one studies the properties of states of matter by using theoretical models or experiments, e.g. with cold atomic gases. Condensed matter physics incorporates topics such as high-temperature superconductivity or topological phases. In the past, research in condensed matter theory led to applications in nano-electronics and nano-structures, gas sensors, nitrogen-vacancy centers and more.

Simulating quantum mechanical systems is one of the first mentioned applications for quantum computing. The dimension of the Hilbert space of such systems grows exponentially with the system size thus simulating a large quantum system with a classical computer is unfeasible. Therefore, Feynman proposed the quantum computer in the 1980s to simulate quantum mechanical systems: “Nature isn’t classical and if you want to make a simulation of Nature, you’d better make it quantum mechanical, and by golly it’s a wonderful problem, because it doesn’t look so easy.”

In this tutorial, we study the two phases of the Bose-Hubbard model. We chose this model because it is widely studied in condensed matter theory so that we can compare our results with existing papers. The Bose-Hubbard model describes interacting bosons on a lattice and exhibits a phase transition between the superfluid (SF) phase and the Mott insulator (MI) phase. The Hamiltonian of the Bose-Hubbard model is $$H = -t\sum\limits_{\langle ij \rangle} a_i^\dagger a_j + \frac{U}{2} \sum\limits_i n_i (n_i -1),\text{.}$$ $\langle ij \rangle$ denotes the summation over neighboring lattice sites and $a_i^\dagger$ and $a_i$ are the bosonic creation and annihilation operators. $t$ is the hopping amplitude and $U$ the on-site interaction strength. As a source for the Bose-Hubbard model we use these two papers: Quantum phase transition from a superfluid to a mott insulator in a gas of ultracold atoms, Collapse and revival of the matter wave field of a Bose–Einstein condensate.

The goal of this blog post is to introduce the Openfermion Pyhton library as a possibility to simulate materials via quantum computing. For this, one uses the Hamiltonian of the corresponding system. Openfermion provides functions for specific Hamiltonians, such as bose_hubbard, but also includes a framework to build operators or Hamiltonians as one desires. The library can additionally be used for quantum chemistry problems, especially to determine the electronic configuration of molecules. The code is available as a notebook, which is included in our Openfermion Apptainer container in the directory /opt/notebooks/. You can find our quantum computing containers here. Later, there will be the possibility to use quantum simulators within the HPC environment provided within the QUICS project.

Study the two phases

In the SF phase one has U = 0. Here, the many-body wavefunction is delocalized. The inverse participation ratio (IPR) is a measure of localization and is defined as $$IPR = \sum\limits_\alpha \mid\phi_\alpha\mid^4, ,$$ where the sum is over all Fock basis states $\alpha$. In an extended/delocalized state the IPR vanishes. Only in a localized state the IPR is non-zero. So in the SF phase we expect the IPR to be small. For $t = 0$, we have the MI phase. The many-body wavefunction is expressed by localized atomic wavefunctions. So here we expect the IPR to be close to $1$. This is how one can create the Bose-Hubbard Hamiltonian and calculate the IPR with the Openfermion library:

import numpy as np
from openfermion.hamiltonians import bose_hubbard
from openfermion.linalg import get_sparse_operator, get_ground_state

H = bose_hubbard(
        x_dimension,
        y_dimension,
        tunneling,
        interaction,
        chemical_potential=0.5,
        dipole=0.0,
        periodic=True,)

H_sparse = get_sparse_operator(H, trunc=trunc)
eigenenergy, eigenstate = get_ground_state(H_sparse)

# Calculate the IPR:
IPR_SF = np.sum(np.abs(eigenstate)**4)

Indeed we get from this $IPR_{SF} = 0.00139$ and $IPR_{MI} = 0.99999$. You can try it yourself in the provided Python notebook. For the MI phase, the localization is not sufficient to decide if one really has found the MI phase. One also has to make sure that a gap appears in the excitation spectrum:

from openfermion.linalg import get_gap,
gap = get_gap(H_sparse)
print("Gap in the excitation spectrum: ", gap)

From this one gets Gap in the excitation spectrum: 0.49999999999998135, so we have indeed found the MI phase.

Time evolution after a Quench

Now we want to study the time evolution of the Bose-Hubbard model after a quench at time zero. We consider here a quench from the SF regime to the MI phase and the other way around. To perform the time evolution of boson operators via Openfermion, one can use the SFOpenBoson plugin or Strawberry Fields. To determine the localization over time, we calculate the IPR with the time dependent state of the system. This is how the time evolution is constructed with Openfermion:

from sfopenboson.ops import BoseHubbardPropagation
from strawberryfields.ops import *
import strawberryfields as sf

k = 20 # Lie product truncation
for time in total_time:
    H_MI = bose_hubbard(
               x_dimension,
               y_dimension,
               t_MI,
               U_MI,
               chemical_potential=0.5,
               dipole=0.0,
               periodic=True,)
    H_SF = bose_hubbard( # Hamiltonian after quench
               x_dimension,
               y_dimension,
               t_SF,
               U_SF,
               chemical_potential=0.5,
               dipole=0.0,
               periodic=True,)
    prog = sf.Program(n_lattice_sites)
    with prog.context as q:
        Ket(eigenstate_MI) | q
        BoseHubbardPropagation(H_SF, time, k, mode='global') | q
        
    eng = sf.Engine("fock", backend_options={"cutoff_dim": trunc})
    final_state = eng.run(prog).state
    state_vector = final_state.ket()

The time evolution is executed with the function BoseHubbardPropagation by using the Lie-product formula and decomposing the unitary operations into a combination of beamsplitters, Kerr gates, and phase-space rotations.

The figure contains the time evolution of the IPR after a quench from the MI regime into the SF phase. One can see, that the initial MI phase vanishes over time but recurs later. The recurring of a phase is also shown in the second Bose-Hubbard paper cited above, where they quench from the SF phase into the MI phase in an experiment with cold atoms in an optical lattice.

As you can see, one can easily implement Hamiltonians with Openfermion and study its properties using quantum computing. This can lower the border for quantum chemists and physicists to enter quantum computing and solve their problems via quantum computing. There are different models, other than the Bose-Hubbard model, already implemented in the Openfermion library, e.g. d-wave models of superconductivity, the Richardson-Gaudin model, or models for uniform electron gas (jellium). In Openfermion are also different methods present such as the Hartree-Fock method, the Davidson method, and the Grassmann wedge product. So you can try out other Hamiltonians or setups in the library. As an outlook, there are different papers studying the electronic structure and ground state of different molecules and models via quantum computing: E.g. the FeMoco molecule and Cytochrome P450, $BeH_2$, $CH_4$, $H_2O$, $HF$ and $NH_3$, an $H_4$ square, an $H_4$ chain, and the Hubbard model, or uniform electron gas, diamond, and nickel oxide. They all use the Openfermion library at least partially in their calculations.


Similar Content