Function Differentiation#
The approximation of differential operators is key to efficiently solve partial differential equations. We provide three mechanisms to do it, which are described below.
|
Finite differences operator with noise resilience. |
|
Nth-order derivative operator via Quantum Fourier Transform. |
|
Constructs a Matrix Product Operator (MPO) of Hermite Distributed Approximating Functionals (HDAFs). |
Finite Differences#
The second-order finite difference method approximates the first and second derivatives of \(f(x)\) as
MPO representation#
This is translated into the quantum register representation using the displacement operator
leading to
These MPOs have a bond dimension equal to the number of displacements (\(\chi=3\) for the second derivative), and an error that decays algebraically with the grid step \(O((\Delta x)^2)\) and exponentially in the number of qubits \(O(2^{-2n})\).
Higher-order stencils#
This approximation is improved with smoother formulas to avoid noise artifacts, following Holoborodko. Higher-order derivatives and higher-order stencils can be constructed using the same formalism, with the order parameter controlling the accuracy of the approximation.
An example on how to use these functions is shown in Differentiation.ipynb.
Hermite Distributed Approximating Functionals (HDAFs)#
HDAFs are well-tempered approximations of the Dirac-delta distribution constructed with Hermite polynomials [HNSK91]. They allow approximating operators that are functions of derivatives, making them particularly useful for computing differential operators and time evolution propagators.
Mathematical formulation#
Given a function \(f(x)\), the HDAF approximation reconstructs it through convolution with a smoothed delta function:
where the HDAF kernel is:
and \(H_n(x)\) is the \(n\)-th Hermite polynomial.
Derivative approximation#
For a derivative of order \(k\), the HDAF approximation becomes:
where \(W\) is a suitable cutoff index where the summand vanishes, and
The vectors of HDAF coefficients decay rapidly, so this expansion can be truncated to finite order, yielding an efficient linear combination of displacement operators.
Kinetic propagator#
Beyond differentiation, HDAFs can also approximate the kinetic propagator
\(\exp(-it\partial_x^2/2)\) directly in the coordinate basis. This is particularly
useful for split-step time evolution methods (see split_step()),
where the kinetic propagator is represented as a banded MPO constructed from
discrete shift operators, with controllable accuracy determined by the truncation order \(M\).
|
Constructs a Matrix Product Operator (MPO) of Hermite Distributed Approximating Functionals (HDAFs). |
Fourier approximation#
Spectral differentiation based on Fourier techniques achieves significantly higher accuracy than finite differences and allows computing any analytical function \(G(\partial_x)\) of the differential operator.
Mathematical formulation#
Ref. García-Ripoll [GR21] shows that the quantum Fourier transform \(\mathcal{F}\) can be used to construct a differential operator as:
where \(\mathbf{p}\) labels the MPS encodings of the vector of frequencies in Fourier space.
Convergence properties#
For analytic and periodic functions, spectral differentiation achieves exponential convergence \(O(e^{-rN})\) with the number of grid points \(N=2^n\). This implies a super-exponential convergence with the number of qubits: \(O(e^{-r2^n})\).
However, when the function is not periodic, or the interval size does not match the period, the Fourier expansion may lead to localized Gibbs oscillations that decay only algebraically with the number of qubits: \(O(N^{-\alpha}) \sim O(2^{-n\alpha})\).
Implementation notes#
While the momentum operator \(\hat{p}\) admits an MPO representation with bond dimension \(\chi=2\), a naive MPO construction of the QFT leads to a bond dimension that grows linearly with the number of sites. Efficient implementations exploiting bit-reversal symmetry significantly reduce this cost [CSW23].
This can be obtained combining the p_to_n_mpo() function with
SeeMPS’s QFT (see Quantum Fourier Transform). The resulting MPOList
object may need to be simplified using simplify_mpo() for
efficient application.
See also#
Quantum Fourier Transform - Quantum Fourier Transform implementation
Function Interpolation - Fourier-based interpolation methods