Gaussian state

In this example, We introduce the preparation of Gaussian state.

What is Gaussian state

Gaussian state is a nn-qubit quantum state defined as

Ψ:=1xf(x)2x=0N1f(x)x.|\Psi\rangle := \frac{1}{\sqrt{\sum_x |f(x)|^2}} \sum_{x=0}^{N-1} f(x) |x\rangle.

where f(x)=exp(βx2/2)f(x) = \exp(-\beta x^2 / 2) is the Gaussian function. Gaussian state is ubiquitous in the application of quantum algorithms in quantum chemistry, simulating quantum field theory, and quantum finance.

The equivalent problem in function approximation

One recent preprint Ref. [1] proposed a procedure for preparing Gaussian state. It leverages the block encoding of the sine value of equally spaced sample points xsin(x/N)xx\sum_x \sin(x/N)|x\rangle\langle x|. By applying quantum eigenvalue transformation on this block encoding, the Gaussian state is prepared. Consequently, the problem is reduced to finding the phase factors generating the following function

h(z)=f(arcsin(z))exp(βarcsin2(x)/2).h(z) = f(\arcsin(z)) \propto \exp(-\beta \arcsin^2(x) / 2).

where z=sin(x)z = \sin(x) transforms the domain to z[0,sin(1)]z\in [0,\sin(1)].

Setup parameters

beta = 100;
targ = @(x) exp(-beta/2 *asin(x).^2);

deg = 100;
opts.intervals=[0,sin(1)];
opts.objnorm = Inf;
opts.epsil = 0.01;
opts.npts = 500;
opts.fscale = 0.99;
opts.isplot=true;

opts.maxiter = 100;
opts.criteria = 1e-12;
opts.useReal = true;
opts.targetPre = true;
opts.method = 'LBFGS';

Approximating the target function by polynomials

Polynomial approximation of gaussian function
Polynomial approximation error

Solving phase factors by running the solver

Verifying the solution

The point-wise error of the solved phase factors.

Reference

  1. McArdle, S., Gilyén, A., & Berta, M. (2022). Quantum state preparation without coherent arithmetic. arXiv preprint arXiv:2210.14892.

Output of the code

Last updated