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

Use random_mps #11

Merged
merged 3 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ITensorGaussianMPS"
uuid = "2be41995-7c9f-4653-b682-bfa4e7cebb93"
authors = ["Matthew Fishman <[email protected]> and contributors"]
version = "0.1.9"
version = "0.1.10"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ println("\nFree fermion starting energy")
@show inner(ψ0, H, ψ0)

# Random starting state
ψr = randomMPS(s, n -> n ≤ Nf ? "1" : "0")
ψr = random_mps(s, n -> n ≤ Nf ? "1" : "0")

println("\nRandom state starting energy")
@show inner(ψr, H, ψr)
Expand Down
4 changes: 4 additions & 0 deletions examples/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
ITensorGaussianMPS = "2be41995-7c9f-4653-b682-bfa4e7cebb93"
ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2"
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"

mtfishman marked this conversation as resolved.
Show resolved Hide resolved
[compat]
ITensorMPS = "0.2.2"
ITensors = "0.6.7"
2 changes: 1 addition & 1 deletion examples/hubbard_1d_spin_conservation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ H = MPO(os_interacting, s)
#@show norm(prod(H) - prod(H_noninteracting))

# Random starting state
ψr = randomMPS(s, n -> n ≤ Nf ? (isodd(n) ? "↑" : "↓") : "0")
ψr = random_mps(s, n -> n ≤ Nf ? (isodd(n) ? "↑" : "↓") : "0")

println("Random starting state energy")
@show flux(ψr)
Expand Down
2 changes: 1 addition & 1 deletion examples/hubbard_2d_spin_conservation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ end
H = MPO(os, s)

# Random starting state
ψr = randomMPS(s, n -> n ≤ Nf ? (isodd(n) ? "↑" : "↓") : "0")
ψr = random_mps(s, n -> n ≤ Nf ? (isodd(n) ? "↑" : "↓") : "0")

println("\nRandom starting state energy")
@show flux(ψr)
Expand Down
2 changes: 1 addition & 1 deletion examples/spinless_fermion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ end
H = MPO(os, s)

# Random starting state
ψr = randomMPS(s, n -> n ≤ Nf ? "1" : "0")
ψr = random_mps(s, n -> n ≤ Nf ? "1" : "0")

println("\nRandom state starting energy")
@show flux(ψr)
Expand Down
4 changes: 4 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2"
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
ITensorMPS = "0.2.2"
ITensors = "0.6.7"
4 changes: 2 additions & 2 deletions test/electron.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ end
H = MPO(os_interacting, s)

# Random starting state
ψr = randomMPS(s, n -> n ≤ Nf ? (isodd(n) ? "↑" : "↓") : "0")
ψr = random_mps(s, n -> n ≤ Nf ? (isodd(n) ? "↑" : "↓") : "0")

@test flux(ψr) == QN(("Nf", Nf, -1), ("Sz", 0))
@test flux(ψ0) == QN(("Nf", Nf, -1), ("Sz", 0))
Expand Down Expand Up @@ -255,7 +255,7 @@ end
H = MPO(os_interacting, s)

# Random starting state
ψr = randomMPS(s, n -> n ≤ Nf ? (isodd(n) ? "↑" : "↓") : "0")
ψr = random_mps(s, n -> n ≤ Nf ? (isodd(n) ? "↑" : "↓") : "0")
@show flux(ψr), flux(ψ0)
#@test flux(ψr) == QN(("Nf", Nf, -1), ("Sz", 0))
#@test flux(ψ0) == QN(("Nf", Nf, -1), ("Sz", 0))
Expand Down
Loading