Bayesian Quantum Phase Estimation

Overview

In Quantum Phase Estimation, we learned that textbook quantum phase estimation (QPE) extracts molecular energies from the phases accumulated during time evolution. Several precision qubits acquire phases at different evolution times, and an inverse quantum Fourier transform (QFT) combines that information into a measurable binary number.

Bayesian quantum phase estimation (BQPE) uses the same relationship between energy and phase but a different way of processing the information.

Instead of storing phase information in a register of precision qubits, BQPE performs a sequence of small experiments. Each experiment uses one ancilla qubit and produces energy-dependent measurement evidence. One circuit execution gives a result of 0 or 1; an estimator can also combine many executions into an estimate of the outcome probabilities. We combine that evidence using probability theory.

The idea is similar to fitting an unknown parameter to experimental data:

  • Start with an estimate of which energies are plausible.

  • Perform an experiment whose outcomes depend on the energy.

  • Update the probabilities assigned to the candidate energies.

  • Choose another experiment and repeat until the energy is determined with sufficient confidence.

The important distinction is that the quantum computer generates energy-dependent ancilla statistics, while a classical calculation combines them. BQPE does not require a precision register or an inverse QFT.

Each round uses one controlled evolution and no inverse QFT. Qrunch chooses the evolution time for each round; a round with a long evolution can still require a deep circuit.

One-ancilla experiments provide energy evidence

Recall the single-ancilla experiment from Quantum Phase Estimation:

  1. Prepare the molecular state, initially assumed to be an exact eigenstate \(|\Psi_k\rangle\) with energy \(E_k\).

  2. Apply a Hadamard gate to an ancilla qubit.

  3. Apply the controlled time evolution \(U(t)=e^{-i\hat Ht}\).

  4. Apply a second Hadamard gate to the ancilla.

  5. Measure the ancilla. A single circuit execution gives either 0 or 1; repeated executions can estimate their probabilities.

As derived in the previous page, the probability of obtaining 0 is

\[P(0\mid E,t)=\frac{1+\cos(Et)}{2},\]

and the probability of obtaining 1 is

\[P(1\mid E,t)=\frac{1-\cos(Et)}{2}.\]

Here we have dropped the eigenstate index on \(E\), because the energy is the unknown quantity we want to determine.

For example, suppose the energy is \(E=-1.2\ E_h\). At evolution time \(t=1\) atomic unit,

\[P(0\mid E=-1.2,t=1) =\frac{1+\cos(-1.2)}{2} \approx 0.681.\]

A single circuit execution still returns only 0 or 1; it does not return \(-1.2\ E_h\). But some candidate energies make the observed outcome more likely than others. BQPE uses this difference to learn the energy. In this implementation, an estimator supplies \(P(0)-P(1)\) for each circuit setting, which is converted to an estimated probability of outcome 0 before the posterior is updated.

From an energy guess to a probability distribution

In BQPE we describe what we know using a probability distribution \(p(E)\). This distribution is called the prior.

For example, suppose we know the energy lies between \(-1.5\) and \(-0.5\ E_h\), but initially have no reason to favor one value in that interval over another. We could choose a uniform prior:

\[\begin{split}p(E)=\begin{cases} 1\ E_h^{-1}, & -1.5\ E_h\leq E\leq -0.5\ E_h,\\ 0, & \text{otherwise}. \end{cases}\end{split}\]

The prior is not a probability distribution over the electronic configurations in a wave function. It describes our classical uncertainty about the value of the energy.

For a single measurement result, we update this distribution using Bayes’ rule:

\[\boxed{ p(E\mid m,t)= \frac{P(m\mid E,t)\,p(E)} {\displaystyle\int P(m\mid E',t)\,p(E')\,dE'} }\]

Here \(m\) is the measured ancilla bit (0 or 1), \(P(m\mid E,t)\) is the measurement probability predicted by a proposed energy, and \(p(E\mid m,t)\) is our updated energy distribution, called the posterior.

The denominator simply makes sure the updated probabilities sum (or integrate) to one.

If we observe 0, energies that predict a large value of \(P(0\mid E,t)\) gain probability; those that predict a small value lose probability. If we observe 1, the update goes in the other direction.

The implementation applies the same idea to an estimated outcome probability rather than retaining individual measurement bits. Candidate energies are favored when their predicted probability agrees with the estimator result. A configurable convergence rate controls how strongly each experiment changes the posterior.

A worked example with three candidate energies

To make the Bayesian update concrete, suppose we have narrowed the energy to just three hypothetical values:

\[E_1=-1.4\ E_h,\qquad E_2=-1.2\ E_h,\qquad E_3=-1.0\ E_h.\]

Initially, we assign all three candidates equal probability:

\[p(E_1)=p(E_2)=p(E_3)=\frac{1}{3}.\]

For this single-shot illustration, we perform an experiment with evolution time \(t=1\) and measure ancilla outcome 0.

For each candidate energy, the likelihood of this result is

\[\begin{split}\begin{aligned} P(0\mid E_1,t=1)&\approx 0.585,\\ P(0\mid E_2,t=1)&\approx 0.681,\\ P(0\mid E_3,t=1)&\approx 0.770. \end{aligned}\end{split}\]

The probabilities after the measurement are obtained by multiplying each prior probability by its corresponding likelihood and normalizing:

\[p(E_j\mid 0,t=1)= \frac{P(0\mid E_j,t=1)/3} {(0.585+0.681+0.770)/3}.\]

Numerically, the updated distribution is approximately:

Probability assigned to each candidate energy

Candidate energy

Before the measurement

After measuring 0

\(-1.4\ E_h\)

33.3%

28.7%

\(-1.2\ E_h\)

33.3%

33.5%

\(-1.0\ E_h\)

33.3%

37.8%

One measurement has only changed our probabilities a little. This is expected: the three energies predict fairly similar measurement probabilities at this evolution time.

A measurement is evidence, not a guaranteed answer. Even if the true energy is \(-1.2\ E_h\), a particular sequence of random outcomes may temporarily favor another candidate. Repeated informative measurements are needed to obtain a reliable estimate.

This three-candidate example is only an illustration. The implementation represents the posterior on a fine, finite grid of candidate energies rather than a short list. It begins with a uniform distribution over a conservative energy interval derived from the Hamiltonian coefficients.

Choosing more informative experiments

The amount learned from a measurement depends on the chosen evolution time. For the simple experiment above,

\[P(0\mid E,t)=\frac{1+\cos(Et)}{2}.\]

A short evolution time may produce nearly identical probabilities for nearby energies. A longer evolution time can make those probabilities much more different, allowing the experiment to distinguish closer energy values.

Probability of measuring ancilla zero for different candidate energies and evolution times.

The plot illustrates the trade-off:

  • Shorter evolution times change the probability more slowly with energy, but tend to have fewer ambiguities over a fixed energy interval.

  • Longer evolution times make the probability more sensitive to energy, but produce more oscillations. Multiple energies can give the same measurement probability.

The longer evolution time is therefore not always better. An experiment that distinguishes two nearby energies may be unhelpful if it cannot distinguish them from many other energies elsewhere in the prior.

Introducing a reference phase

There is another way to make an experiment more informative without changing the molecular evolution time.

We can introduce a known phase shift \(\beta\) on the ancilla before the final interference measurement. This changes the measurement probability to

\[P(0\mid E,t,\beta)= \frac{1+\cos(Et-\beta)}{2}\]

and

\[P(1\mid E,t,\beta)= \frac{1-\cos(Et-\beta)}{2}.\]

(The sign of \(\beta\) is a convention: reversing the ancilla phase-shift gate reverses that sign.)

The Hamiltonian and molecular state have not changed. We have only changed the known phase against which the unknown molecular phase interferes.

For example, setting \(\beta=0\) measures a dependence on \(\cos(Et)\). Setting \(\beta=\pi/2\) gives a dependence on \(\sin(Et)\), which can resolve ambiguities that a cosine-only measurement cannot distinguish.

This is similar in spirit to varying the reference phase in an interferometric measurement.

How BQPE becomes adaptive

After each experiment, the posterior distribution tells us which energies remain plausible. We can use it to choose the next evolution time and reference phase.

For example, if the current posterior is broad, a shorter evolution time may help identify the approximate phase without introducing too many periodic ambiguities. Once the posterior is concentrated in a narrower region, longer times can help distinguish nearby candidate energies. This implementation uses the posterior mean and spread to choose the next time, increasing it as uncertainty falls up to a configured limit.

The reference phase can also be chosen so that the measurement is sensitive to differences within the part of the energy range we currently consider most likely.

The overall procedure is therefore:

  1. Begin with a prior distribution \(p(E)\).

  2. Choose an evolution time \(t\) and a reference phase \(\beta\).

  3. Prepare the molecular state and perform the single-ancilla experiment.

  4. Measure the ancilla, obtaining \(m\in\{0,1\}\).

  5. Update \(p(E)\) using Bayes’ rule and the likelihood \(P(m\mid E,t,\beta)\).

  6. Repeat, using the updated distribution to choose subsequent experiments.

This is adaptive Bayesian phase estimation. Not every BQPE implementation must be adaptive: the sequence of experiments may also be fixed in advance. The Bayesian update works in either case.

The posterior can yield a point estimate together with an uncertainty interval. This implementation reports the posterior mean and standard deviation, and stops early once the standard deviation is below the requested tolerance.

In Qrunch, shots sets how many times each circuit is measured. convergence_rate sets how strongly each round changes the estimate. Higher values can reach the stopping tolerance in fewer rounds, but can give too much weight to a noisy result. Lower values make smaller updates and may need more rounds. The reported spread is not a hardware error bar.

Why this is different from textbook QPE

Both methods extract energy from the same controlled time-evolution operation. They differ in when the ancilla is measured and where the phase information is combined.

Textbook QPE compared with BQPE

Feature

Textbook QPE

BQPE

Ancilla qubits

Several precision qubits

One per experiment

Evolution times

Typically powers of two, applied coherently

Chosen across separate experiments

Combining phase information

Inverse QFT on the quantum register

Classical Bayesian inference

Measurement results

A multi-bit outcome estimating the phase

One ancilla outcome per shot or an aggregate statistic, combined classically

Uncertainty

Inferred from outcome statistics and the chosen precision

Explicitly represented by a posterior distribution

The advantage of BQPE is not that it avoids long evolution times. It avoids the need to retain several precision qubits coherently and perform an inverse QFT. Resolving small energy differences still requires enough total phase sensitivity, which generally means long evolutions, repeated experiments, or both.

A drawback is that BQPE does not produce an energy estimate from a single shot: each shot yields only one ancilla bit, and many shots must be combined classically. Textbook QPE can produce a multi-bit phase estimate in one circuit execution, although repeated executions may still be needed for confidence or to obtain the desired eigenvalue.

There is therefore a trade-off between qubit count and coherent circuit depth on one side, and the number of shots on the other. Using fewer qubits and simpler circuits can be preferable on hardware with limited coherence, provided the required shot count scales favorably with system size and target precision. BQPE reduces the precision-register overhead, but its individual controlled evolutions can still be long.

Conventional VQE energy measurement illustrates the short-circuit, many-shot end of this trade-off. Instead of controlled time evolution, it estimates the Hamiltonian expectation value by measuring groups of compatible Pauli terms in separately prepared states. The measurement circuits add relatively little depth beyond state preparation, but shots must be allocated across the groups. The total measurement cost can become very large as the Hamiltonian grows or the requested uncertainty decreases; its scaling depends on the Hamiltonian, state, grouping, and shot allocation.

What if the initial state is not an eigenstate?

Until now, we assumed the initial molecular state was an exact eigenstate. This is important: the single-energy likelihood above is not generally correct for an arbitrary approximate wave function.

Suppose the prepared state is

\[|\Psi\rangle=\sum_k c_k|\Psi_k\rangle,\]

where each \(|\Psi_k\rangle\) is an eigenstate of the simulated Hamiltonian with energy \(E_k\).

For this state, the probability of observing ancilla outcome 0 is

\[P(0\mid t,\beta)= \frac12\left[ 1+\sum_k |c_k|^2\cos(E_kt-\beta) \right].\]

The measured signal now contains contributions from several energies. Repeating an experiment does not automatically remove the contributions from excited states.

For textbook QPE, an ideal measurement resolves one of the eigenvalues with probability \(|c_k|^2\). For BQPE, the interpretation depends on the inference model and experimental protocol. A single-energy Bayesian model is justified only when the input state behaves sufficiently like one eigenstate, or when other components are properly accounted for.

A state prepared with FAST-VQE or BEAST-VQE may provide a useful starting point, but its overlap with the desired eigenstate still matters.

Accuracy and the chosen Hamiltonian

The main difficulties are the same as for textbook QPE:

  • State preparation: Does the initial state have enough overlap with the eigenstate whose energy we want?

  • Time evolution: How accurately can we implement \(e^{-i\hat Ht}\)? Approximations such as Trotter–Suzuki decomposition can introduce systematic simulation errors.

  • Resolution, statistics, and noise: Are the evolution times, measurements, and inference model sufficient to distinguish nearby energies? Hardware noise can also distort the likelihood.

An apparently narrow posterior is not by itself a guarantee of an accurate molecular energy. If the likelihood assumes incorrect time evolution, ignores important eigenstate components, or models the noise poorly, the reported uncertainty can be misleading.

Moreover, perfect BQPE estimates eigenvalues only of the Hamiltonian being simulated. It does not fix an inadequate orbital basis, active space, or electronic-structure approximation.

For example, BEAST-VQE uses a paired hard-core-boson Hamiltonian with one qubit per spatial orbital. It excludes broken-pair configurations. BQPE using the paired Hamiltonian and a BEAST-VQE state may improve the estimated eigenvalue within that paired model, but cannot restore configurations excluded by that model.

See also

Further reading

  • N. Wiebe and C. Granade, “Efficient Bayesian Phase Estimation”, Physical Review Letters 117, 010503 (2016). DOI: 10.1103/PhysRevLett.117.010503.