Closed JoeyT1994 closed 3 months ago
The stencil idea is really nice. Are yall planning to lift the limitation on only passing three numbers?
The stencil idea is really nice. Are yall planning to lift the limitation on only passing three numbers?
I think so! It seems straightforward enough to do shift by any multiple of (1/2^{L}) so that would allow us to create stencils for even higher order derivatives.
@ryanlevy Sure let me add some comments because those functions are ambiguous (and probably need better naming)
This code adds operators into the mix, specifically the ability to build derivative operators by constructing
stencils
which are operators that perform the mapping:f(x,y,z, ...) -> a*f(x+h, y, z, ...) + b*f(x, y, z, ...) + c*f(x-h, y, z, ...)
wherea,b,c
are arbitrary scalars andh = 1/(2^L)
withL
the number of bits in the dimension where the derivative is being taken. The derivative can be taken in any dimension you wish.Currently this operator is only supported on
trees
but a simple modification can be done to make it work on any graph (by taking a spanning tree of that graph).Tests are included. Slight refactor of the
TensorNetworkFunctionals.jl
file to streamline the module interface.