Skip to content

Commit

Permalink
Use random_mps (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman authored May 17, 2024
1 parent 8c37b37 commit 9fb4e04
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
Accessors = "0.1.26"
Compat = "4.8"
Folds = "0.2.8"
ITensorMPS = "0.1.7"
ITensorMPS = "0.1.7, 0.2"
ITensors = "0.3.58, 0.4, 0.5, 0.6"
MPI = "0.20"
julia = "1.6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function main(;
# sequential vs. threaded.
itensor_rng = Xoshiro()
Random.seed!(itensor_rng, seed)
psi0 = randomMPS(itensor_rng, sites, state; linkdims=10)
psi0 = random_mps(itensor_rng, sites, state; linkdims=10)
else
psi0 = MPS(sites, state)
end
Expand Down
2 changes: 1 addition & 1 deletion examples/02_mpi_mpo_sum_2d_hubbard_conserve_momentum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function main(;
# sequential vs. threaded.
itensor_rng = Xoshiro()
Random.seed!(itensor_rng, seed)
psi0 = randomMPS(itensor_rng, sites, state; linkdims=10)
psi0 = random_mps(itensor_rng, sites, state; linkdims=10)
else
psi0 = MPS(sites, state)
end
Expand Down
4 changes: 4 additions & 0 deletions examples/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Strided = "5e0ebb24-38b0-5f93-81fe-25c709ecae67"

[compat]
ITensorMPS = "0.2.2"
ITensors = "0.6.7"
4 changes: 4 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Strided = "5e0ebb24-38b0-5f93-81fe-25c709ecae67"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
ITensorMPS = "0.2.2"
ITensors = "0.6.7"
2 changes: 1 addition & 1 deletion test/test_partition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using Test
@test length(os_partition_manual) == length(os_partition_auto)

s = siteinds("S=1/2", nx * ny)
ψ = randomMPS(s, j -> isodd(j) ? "" : ""; linkdims=10)
ψ = random_mps(s, j -> isodd(j) ? "" : ""; linkdims=10)

H = MPO(os, s)
@test maxlinkdim(H) == 3 * (ny + 1) - 1
Expand Down

0 comments on commit 9fb4e04

Please sign in to comment.