Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operators #13

Merged
merged 10 commits into from
Apr 9, 2024
Merged

Operators #13

merged 10 commits into from
Apr 9, 2024

Conversation

JoeyT1994
Copy link
Owner

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, ...) where a,b,c are arbitrary scalars and h = 1/(2^L) with L 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.

@JoeyT1994 JoeyT1994 requested a review from ryanlevy March 28, 2024 22:23
@emstoudenmire
Copy link
Collaborator

The stencil idea is really nice. Are yall planning to lift the limitation on only passing three numbers?

@JoeyT1994
Copy link
Owner Author

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.

@JoeyT1994 JoeyT1994 mentioned this pull request Apr 1, 2024
8 tasks
Copy link
Collaborator

@ryanlevy ryanlevy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, could you just add some comments/docstrings on the itensornetworkutils.jl functions and either in this one or another PR we can address the numerical type "safety"

@JoeyT1994
Copy link
Owner Author

@ryanlevy Sure let me add some comments because those functions are ambiguous (and probably need better naming)

@JoeyT1994 JoeyT1994 merged commit 115da06 into main Apr 9, 2024
3 checks passed
@JoeyT1994 JoeyT1994 deleted the operators branch May 15, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants