Skip to content

Commit 1e07b3c

Browse files
authored
Use random_mps (#11)
1 parent bc8fffd commit 1e07b3c

File tree

8 files changed

+15
-7
lines changed

8 files changed

+15
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensorGaussianMPS"
22
uuid = "2be41995-7c9f-4653-b682-bfa4e7cebb93"
33
authors = ["Matthew Fishman <[email protected]> and contributors"]
4-
version = "0.1.9"
4+
version = "0.1.10"
55

66
[deps]
77
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ println("\nFree fermion starting energy")
6161
@show inner(ψ0, H, ψ0)
6262

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

6666
println("\nRandom state starting energy")
6767
@show inner(ψr, H, ψr)

examples/Project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
ITensorGaussianMPS = "2be41995-7c9f-4653-b682-bfa4e7cebb93"
33
ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2"
44
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
5+
6+
[compat]
7+
ITensorMPS = "0.2.2"
8+
ITensors = "0.6.7"

examples/hubbard_1d_spin_conservation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ H = MPO(os_interacting, s)
8787
#@show norm(prod(H) - prod(H_noninteracting))
8888

8989
# Random starting state
90-
ψr = randomMPS(s, n -> n Nf ? (isodd(n) ? "" : "") : "0")
90+
ψr = random_mps(s, n -> n Nf ? (isodd(n) ? "" : "") : "0")
9191

9292
println("Random starting state energy")
9393
@show flux(ψr)

examples/hubbard_2d_spin_conservation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ end
8282
H = MPO(os, s)
8383

8484
# Random starting state
85-
ψr = randomMPS(s, n -> n Nf ? (isodd(n) ? "" : "") : "0")
85+
ψr = random_mps(s, n -> n Nf ? (isodd(n) ? "" : "") : "0")
8686

8787
println("\nRandom starting state energy")
8888
@show flux(ψr)

examples/spinless_fermion.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ end
5353
H = MPO(os, s)
5454

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

5858
println("\nRandom state starting energy")
5959
@show flux(ψr)

test/Project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2"
33
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
44
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
55
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
6+
7+
[compat]
8+
ITensorMPS = "0.2.2"
9+
ITensors = "0.6.7"

test/electron.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ end
106106
H = MPO(os_interacting, s)
107107

108108
# Random starting state
109-
ψr = randomMPS(s, n -> n Nf ? (isodd(n) ? "" : "") : "0")
109+
ψr = random_mps(s, n -> n Nf ? (isodd(n) ? "" : "") : "0")
110110

111111
@test flux(ψr) == QN(("Nf", Nf, -1), ("Sz", 0))
112112
@test flux(ψ0) == QN(("Nf", Nf, -1), ("Sz", 0))
@@ -255,7 +255,7 @@ end
255255
H = MPO(os_interacting, s)
256256

257257
# Random starting state
258-
ψr = randomMPS(s, n -> n Nf ? (isodd(n) ? "" : "") : "0")
258+
ψr = random_mps(s, n -> n Nf ? (isodd(n) ? "" : "") : "0")
259259
@show flux(ψr), flux(ψ0)
260260
#@test flux(ψr) == QN(("Nf", Nf, -1), ("Sz", 0))
261261
#@test flux(ψ0) == QN(("Nf", Nf, -1), ("Sz", 0))

0 commit comments

Comments
 (0)