Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Insert projectors to PEPS optimizations - #18

Merged
LinjianMa merged 5 commits into
ITensor:mainfrom
LinjianMa:main
Jul 26, 2021
Merged

Insert projectors to PEPS optimizations#18
LinjianMa merged 5 commits into
ITensor:mainfrom
LinjianMa:main

Conversation

@LinjianMa

Copy link
Copy Markdown
Collaborator

I don't know if this's the best way to do it, so just put it here for discussion. Tests haven't been added yet.

Maybe the inv_op can be merged with those in the ITensorChainRules module.

Comment thread src/Optimizations/itensor_network.jl Outdated
@mtfishman

Copy link
Copy Markdown
Member

This seems like a good way to go.

@LinjianMa

Copy link
Copy Markdown
Collaborator Author

This seems like a good way to go.

sounds good, I will work on rrule for split_network on top of this.

@LinjianMa LinjianMa changed the title Add rrule for split_links Insert projectors to PEPS optimizations Jul 22, 2021
@LinjianMa

Copy link
Copy Markdown
Collaborator Author

This PR is still in progress

@LinjianMa

Copy link
Copy Markdown
Collaborator Author

@mtfishman please take a look, note that for the rrule for split_networks, https://github.com/LinjianMa/ITensorNetworkAD.jl/blob/main/src/Optimizations/itensor_network.jl#L5,
I use setinds rather than write rule for split_links. This is because for split_links, the outlinkinds function call is hard to write pullback function. https://github.com/LinjianMa/ITensorNetworkAD.jl/blob/main/src/ITensorNetworks/itensor_network.jl#L200

Comment thread src/ITensorNetworks/boundary_mps.jl Outdated
Comment thread src/Optimizations/itensor_network.jl
@mtfishman

Copy link
Copy Markdown
Member

@mtfishman please take a look, note that for the rrule for split_networks, https://github.com/LinjianMa/ITensorNetworkAD.jl/blob/main/src/Optimizations/itensor_network.jl#L5,
I use setinds rather than write rule for split_links. This is because for split_links, the outlinkinds function call is hard to write pullback function. https://github.com/LinjianMa/ITensorNetworkAD.jl/blob/main/src/ITensorNetworks/itensor_network.jl#L200

I thought you had already written a rule for split_links? But anyway, I see that split_network would not be easy for Zygote to differentiate through as it is written.

ITensors.prime(P::PEPS, n::Integer=1) = PEPS(map(x -> prime(x, n), P.data))

# prime a PEPS with specified indices
function ITensors.prime(indices::Array{<:Index,1}, P::PEPS, n::Integer=1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would be nice to implement a more direct prime(siteinds, ::PEPS, ...) function to complement prime(linkinds, ::PEPS, ...). I'll add that as an issue.

@mtfishman

Copy link
Copy Markdown
Member

Great to see this coming along. What kinds of system sizes have you tried so far?

@LinjianMa

Copy link
Copy Markdown
Collaborator Author

Great to see this coming along. What kinds of system sizes have you tried so far?

Currently, it still can't accelerate large system calculations, and the major reason is that using the greedy search algorithm to find the contraction path won't find the optimal one, and the path it generates will still have large intermediates. For other heuristics I've tried, such as dynamic programming, the contraction_path finding time is too long. I will next work on the constrained contraction path optimization that is implemented in AutoHOOT, and try to get that working with PEPS.

@mtfishman

Copy link
Copy Markdown
Member

Interesting to hear that the contraction path computation is the limiting factor. What systems sizes can you reach before the contraction path is too costly to compute?

Probably you've considered this, but a simple optimization to do would be to precompute the contraction paths, since they will be the same every time the gradient is being computed.

@LinjianMa
LinjianMa merged commit 00d2811 into ITensor:main Jul 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants