seemps.analysis.finite_differences.smooth_finite_differences_mpo#

seemps.analysis.finite_differences.smooth_finite_differences_mpo(L, order, filter=3, dx=1.0, periodic=False, base=2, tol=0.0001)[source]#

Finite differences operator with noise resilience. Create the operator that implements a finite-difference approximation to the derivative of given order for a function encoded in L units of dimension base (which defaults to 2 for qubits). It assumes a uniformly spaced grid with separation dx.

Parameters:
Lint

Number of elements in the quantum register

orderint

Order of the derivative (currently 1 or 2)

filterint, default = 3

Size of the finite-difference formula with implicit filtering

dxfloat, default = 1.0

Spacing of the grid

periodicbool, default = False

Whether the grid assumes periodic boundary conditions

baseint, default = 2

Quantization of the tensor train (i.e. dimension of the register units)

tolfloat, deafult = 1e-4

Tolerance of the step size to avoid rounding errors

Returns:
operatorMPO

Matrix product operator encoding the finite difference formula

Notes

See http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/smooth-low-noise-differentiators