From 4c23439ce75998c9cff4d2684f1546f22799328a Mon Sep 17 00:00:00 2001 From: Matt Fishman Date: Thu, 16 May 2024 22:10:36 -0400 Subject: [PATCH] Use `random_mps` (#14) --- examples/pyscf.jl | 2 +- test/Project.toml | 4 ++++ test/molecular_orbital_hamiltonian.jl | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/pyscf.jl b/examples/pyscf.jl index 39cd8eb..84834ce 100644 --- a/examples/pyscf.jl +++ b/examples/pyscf.jl @@ -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 diff --git a/test/Project.toml b/test/Project.toml index 880d52f..fd50671 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -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" diff --git a/test/molecular_orbital_hamiltonian.jl b/test/molecular_orbital_hamiltonian.jl index 9fc64dc..efaad1e 100644 --- a/test/molecular_orbital_hamiltonian.jl +++ b/test/molecular_orbital_hamiltonian.jl @@ -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)