Skip to content

Commit

Permalink
fix typef in zipper (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpawela authored Jul 12, 2024
1 parent ad66926 commit 970f4f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SpinGlassTensors"
uuid = "7584fc6a-5a23-4eeb-8277-827aab0146ea"
authors = ["Anna Maria Dziubyna <[email protected]>", "Tomasz Śmierzchalski <[email protected]>", "Bartłomiej Gardas <[email protected]>", "Konrad Jałowiecki <[email protected]>", "Łukasz Pawela <[email protected]>", "Marek M. Rams <[email protected]>"]
version = "1.1.2"
version = "1.1.3"

[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand Down
2 changes: 1 addition & 1 deletion src/mps/canonise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function measure_spectrum(ψ::QMps{T}) where {T<:Real}
@tensor M[x, σ, y] := B[x, σ, α] * R[α, y]
# @cast M[x, (σ, y)] := M[x, σ, y] TODO: restore when deps merged
M = reshape(M, :, size(M, 2) * size(M, 3))
Dcut, tolS = 100000, 0.0
Dcut, tolS = 100000, zero(T)
U, S, _ = svd_fact(Array(M), Dcut, tolS)
push!(schmidt, i => S)
R = U * Diagonal(S)
Expand Down
8 changes: 4 additions & 4 deletions src/zipper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ function zipper(
Ur = hcat(Urs...)
Vr = hcat(Vrs...)
Sr = vcat(Srs...) ./ iters_rand
QU, RU = qr_fact(Ur, Dtemp * iters_rand, 0.0; toGPU = false, kwargs...)
QV, RV = qr_fact(Vr, Dtemp * iters_rand, 0.0; toGPU = false, kwargs...)
QU, RU = qr_fact(Ur, Dtemp * iters_rand, zero(R); toGPU = false, kwargs...)
QV, RV = qr_fact(Vr, Dtemp * iters_rand, zero(R); toGPU = false, kwargs...)
Ur, Sr, Vr = svd_fact(RU * Diagonal(Sr) * RV', Dtemp, tol; kwargs...)
# Ur = QU * Ur
Vr = QV * Vr
Expand All @@ -85,15 +85,15 @@ function zipper(
x = update_env_right(CM.C, x, CM.M, CM.B)
CCC = reshape(permutedims(x, (1, 3, 2)), size(CM.B, 1) * size(CM.M, 1), :)

Ut, _ = qr_fact(CCC, Dtemp, 0.0; toGPU = ψ.onGPU, kwargs...)
Ut, _ = qr_fact(CCC, Dtemp, zero(R); toGPU = ψ.onGPU, kwargs...)

# CM' * Ut
x = reshape(Ut, size(CM.B, 1), size(CM.M, 1), :)
x = permutedims(x, (1, 3, 2))
yp = project_ket_on_bra(x, CM.B, CM.M, CM.C)
CCC = reshape(permutedims(yp, (2, 3, 1)), size(CM.C, 2) * size(CM.M, 2), :)

Vr, _ = qr_fact(CCC, Dtemp, 0.0; toGPU = ψ.onGPU, kwargs...)
Vr, _ = qr_fact(CCC, Dtemp, zero(R); toGPU = ψ.onGPU, kwargs...)
end

# CM * Vr
Expand Down

2 comments on commit 970f4f3

@lpawela
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/110935

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.3 -m "<description of version>" 970f4f3a8792675b140156bdd17359420dfeb4d0
git push origin v1.1.3

Please sign in to comment.