diff --git a/Project.toml b/Project.toml index 8844315..11f034a 100644 --- a/Project.toml +++ b/Project.toml @@ -21,7 +21,7 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" ChainRulesCore = "1.10" DataFrames = "1.6" HDF5 = "0.13.1, 0.14, 0.15, 0.16" -ITensors = "0.3.20" +ITensors = "0.6.8" JLD2 = "0.4.14" Observers = "0.2" Optimisers = "0.2" diff --git a/README.md b/README.md index 93b11a3..ed1830f 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,7 @@ H = MPO(os, hilbert) nsweeps = 10 maxdim = [10, 20, 30, 50, 100] cutoff = 1e-10 -Edmrg, Φ = dmrg(H, randomMPS(hilbert); outputlevel=0, nsweeps, maxdim, cutoff); +Edmrg, Φ = dmrg(H, random_mps(hilbert); outputlevel=0, nsweeps, maxdim, cutoff); @printf("\nGround state energy from DMRG: %.10f\n\n", Edmrg) # layer of single-qubit Ry gates diff --git a/examples/05_finitetemperature.jl b/examples/05_finitetemperature.jl index 7422bab..26c93f7 100644 --- a/examples/05_finitetemperature.jl +++ b/examples/05_finitetemperature.jl @@ -87,7 +87,7 @@ H = MPO(ampo, sites) # Density-matrix renormalization group dmrg_iter = 5 # DMRG steps dmrg_cutoff = 1E-10 # Cutoff -Ψ0 = randomMPS(sites) # Initial state +Ψ0 = random_mps(sites) # Initial state sweeps = Sweeps(dmrg_iter) maxdim!(sweeps, 10, 20, 30, 40, 50, 100) cutoff!(sweeps, dmrg_cutoff) diff --git a/examples/09_qst_ising.jl b/examples/09_qst_ising.jl index 0861c9a..caab24f 100644 --- a/examples/09_qst_ising.jl +++ b/examples/09_qst_ising.jl @@ -25,7 +25,7 @@ H = MPO(ampo, sites) # Run DMRG dmrg_iter = 5 # DMRG steps dmrg_cutoff = 1E-10 # Cutoff -Ψ0 = randomMPS(sites) # Initial state +Ψ0 = random_mps(sites) # Initial state sweeps = Sweeps(dmrg_iter) maxdim!(sweeps, 10, 20, 30, 40, 50, 100) cutoff!(sweeps, dmrg_cutoff) diff --git a/examples/10_vqe.jl b/examples/10_vqe.jl index f9eab1e..39a1fbb 100644 --- a/examples/10_vqe.jl +++ b/examples/10_vqe.jl @@ -33,7 +33,7 @@ H = MPO(os, hilbert) nsweeps = 10 maxdim = [10, 20, 30, 50, 100] cutoff = 1e-10 -Edmrg, Φ = dmrg(H, randomMPS(hilbert); outputlevel=0, nsweeps, maxdim, cutoff); +Edmrg, Φ = dmrg(H, random_mps(hilbert); outputlevel=0, nsweeps, maxdim, cutoff); @printf("\nGround state energy from DMRG: %.10f\n\n", Edmrg) # layer of single-qubit Ry gates diff --git a/src/randomstates.jl b/src/randomstates.jl index 51b1e47..c7f7154 100644 --- a/src/randomstates.jl +++ b/src/randomstates.jl @@ -281,7 +281,7 @@ function randomstate(ElT::Type{<:Number}, T::Type, sites::Vector{<:Index}; kwarg if T == MPS # Build MPS by random parameter initialization alg == "rand" && (M = random_mps(ElT, sites, χ, σ)) - alg == "circuit" && (M = randomMPS(ElT, sites; linkdims=χ)) + alg == "circuit" && (M = random_mps(ElT, sites; linkdims=χ)) elseif T == MPO error("initialization of random MPO density matrix not yet implemented.") elseif T == LPDO @@ -358,7 +358,7 @@ function randomprocess(ElT::Type{<:Number}, T::Type, sites::Vector{<:Index}; kwa if alg == "rand" M = random_mpo(ElT, sites, χ, σ; processtags=processtags) else - error("randomMPO with circuit initialization not implemented yet") + error("random_mpo with circuit initialization not implemented yet") end elseif T == LPDO M = random_choi(ElT, sites, χ, ξ, σ; purifier_tags=purifier_tags) diff --git a/test/chainrulestestutils.jl b/test/chainrulestestutils.jl index 37ced18..7e8a795 100644 --- a/test/chainrulestestutils.jl +++ b/test/chainrulestestutils.jl @@ -32,7 +32,7 @@ end function ChainRulesTestUtils.rand_tangent(rng::AbstractRNG, A::ITensor) # TODO: generalize to sparse tensors - return isempty(inds(A)) ? ITensor(randn(eltype(A))) : randomITensor(eltype(A), inds(A)) + return isempty(inds(A)) ? ITensor(randn(eltype(A))) : random_itensor(eltype(A), inds(A)) end function ChainRulesTestUtils.rand_tangent(rng::AbstractRNG, x::Index)