Skip to content

Commit

Permalink
Use random_mps (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman authored May 17, 2024
1 parent c36ccc8 commit 4c23439
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/pyscf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ e_mf_mps = inner(ψmf', H, ψmf)
println("Energy Error from MF MPS (Ha) ", abs(e_mf_mps - mf.e_tot))

# Initialize our MPS
ψ0 = randomMPS(s, occupation_to_state.(n_occ); linkdims=40)
ψ0 = random_mps(s, occupation_to_state.(n_occ); linkdims=40)
@show inner(ψ0', H, ψ0)

# Run DMRG
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 @@ ITensorChemistry = "cbb729c8-cb01-4982-b6b1-bc32521fc628"
ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2"
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
ITensorMPS = "0.2.2"
ITensors = "0.6.7"
2 changes: 1 addition & 1 deletion test/molecular_orbital_hamiltonian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ end
setmaxdim!(sweeps, 100, 200)
setcutoff!(sweeps, 1e-10)
setnoise!(sweeps, 1e-6, 1e-7, 1e-8, 0.0)
Ee, ψe = dmrg(He, randomMPS(se), sweeps; outputlevel=0)
Ee, ψe = dmrg(He, random_mps(se), sweeps; outputlevel=0)

sweeps = Sweeps(10)
setmaxdim!(sweeps, 100, 200)
Expand Down

0 comments on commit 4c23439

Please sign in to comment.