A VPE estimator that works by fitting a set of known frequencies.

A Hamiltonian being fast-forwardable is equivalent to its spectral decomposition being known. This means that the only information to be obtained from QPE is the amplitudes. This estimator proceeds by a simple least-squares fit to obtain the amplitudes, and then outputs the expectation values.



View source

Fits the amplitudes in the phase function to the input signal data.

phase_function [numpy.ndarray] -- Phase function input

amplitudes [numpy.ndarray] -- Fitted estimates of the amplitudes of the given frequencies (in the same order as in self.energies)


View source

Estates expectation values via amplitude fitting of known frequencies

phase_function [numpy.ndarray] -- The phase function obtained in experiment

expectation_value [float] -- the estimated expectation value


View source

Generates time points for estimation

VPE requires estimating the phase function g(t) at multiple points t, and some care in choosing these points is needed to prevent aliasing. This should be taken care of in the estimator.

In this case, we fit len(self.energies) complex amplitudes to a complex valued signal, we need precisely this number of points in the signal.

However, it appears numerically that approximately twice as many points are needed to prevent aliasing, so we double this number here.

Then, to prevent aliasing, we need to make sure that the time step dt < 2*pi / (E_max-E_min). Here, we choose dt = pi / (E_max-E_min). (Importantly, for Pauli operators this reproduces the H test.)

safe [bool, default True] -- numerical testing shows that taking approximately twice as many points is better for the stability of the estimator; this

times a set of times t that g(t) should be estimated at.