In this example, We introduce the implementation of uniform singular value amplification.
What is uniform singular value amplification
Uniform singular value amplification uniformly amplifies the singular values of a matrix represented as a projected unitary. Suppose that we have access to a unitary U, its inverse U† and the controlled reflection operators (2Π−I), (2Π~−I). A:=Π~UΠ is of our interest and has a singular value decomposition A=WΣV.
The equivalent problem in function approximation
The goal of uniform singular value amplification is to implement the singular value transformation of A for function f(x). Here, f(x) is linear function λx over some interval and takes value zero for other x.
For numerical demonstration, we consider target function to be
f(x)=x/a,x∈[0,a],a=0.2.
To numerically find the best odd polynomial approximating f(x), we use a subroutine which solves the problem using convex optimization. We first set the parameters of the subroutine.
For numerical demonstration, we scale the target function by a factor of 0.9, to improve the numerical stability.
We call a subroutine to find the best odd polynomial approximating f(x) on the interval Da=[0,a], where we solves the problem by convex optimization. Here are the parameters set for the subroutine.
a = 0.2;
targ = @(x) x/a;
deg = 101;
parity = mod(deg, 2);
delta =0.01;
opts.intervals=[0,a];
opts.objnorm = Inf;
% opts.epsil is usually chosen such that target function
% is bounded by 1-opts.epsil over D_delta
opts.epsil = 0.01;
opts.npts = 500;
opts.fscale = 0.9;
opts.isplot=true;
coef_full=cvx_poly_coef(targ, deg, opts);
% The solver outputs all Chebyshev coefficients while we have to post-select
% those of odd order due to the parity constraint.
coef = coef_full(1+parity:2:end);
Set up parameters
We use Newton method for solving phase factors. The parameters of the solver is initiated as follows.
Gilyén, A., Su, Y., Low, G. H., & Wiebe, N. (2019, June). Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing (pp. 193-204).
Dong, Y., Meng, X., Whaley, K. B., & Lin, L. (2021). Efficient phase-factor evaluation in quantum signal processing. Physical Review A, 103(4), 042419.
Output of the code
norm error = 6.22653e-06
max of solution = 0.992105
iter err
1 +7.4719e-01
2 +2.1185e-01
3 +4.7890e-02
4 +5.7683e-03
5 +1.5395e-04
6 +1.3721e-07
Stop criteria satisfied.
The residual error is
7.3552e-14
We verify the solved phase factors by computing the residual error in terms of l∞ norm.