seemps.analysis.derivatives.finite_differences_mpo#

seemps.analysis.derivatives.finite_differences_mpo(order: int, interval: TypeAliasForwardRef('~seemps.analysis.mesh.QuantizedInterval') | tuple[float, float, int], filter: int = 3, periodic: bool = False, base: int = 2, tol: float = 1e-4) MPO[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:
orderint

Order of the derivative (currently 1 or 2)

interval: QuantizedInterval | IntervalTuple

The interval over which the function is defined.

filterint, default = 3

Size of the finite-difference formula with implicit filtering

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