Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Add mixed_canonize function #10

Merged
merged 9 commits into from
Feb 20, 2024
Merged

Add mixed_canonize function #10

merged 9 commits into from
Feb 20, 2024

Conversation

jofrevalles
Copy link
Member

@jofrevalles jofrevalles commented Feb 20, 2024

Summary

This PR adds the function mixed_canonize, which transforms a given Chain into the mixed canonical form around a center Site. This means that, for a Chain in the mixed canonical form, it will have left canonical tensors for sites i<=center and right canonical tensors elsewhere. Additionally, at the center Site there will be a matrix which contains singular values.
For now, this is only implemented for the Open boundary case.

Example

Here we show an example of how this function works:

julia> qtn  = Chain(State(), Open(), [rand(4, 4), rand(4, 4, 4), rand(4, 4, 4), rand(4, 4, 4), rand(4, 4)])
MPS (inputs=0, outputs=5)

julia> canonized = mixed_canonize(qtn, Site(3))
MPS (inputs=0, outputs=5)

julia> length(tensors(qtn))
5

julia> length(tensors(canonized)) # 5 tensors + 1 singular value matrix
6

julia> isapprox(contract(transform(TensorNetwork(canonized), Tenet.HyperindConverter())), contract(TensorNetwork(qtn)))
true

@jofrevalles jofrevalles changed the title Add mixed_canonical_form function Add mixed_canonize function Feb 20, 2024
src/Ansatz/Chain.jl Outdated Show resolved Hide resolved
Co-authored-by: Sergio Sánchez Ramírez <[email protected]>
@mofeing mofeing merged commit 7d06665 into master Feb 20, 2024
0 of 2 checks passed
@mofeing mofeing deleted the feature/mixed-canonical-form branch February 20, 2024 11:38
@mofeing mofeing mentioned this pull request Feb 21, 2024
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