diff --git a/Project.toml b/Project.toml index 1ddd8f5..689fa1d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ITensorMPS" uuid = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2" authors = ["Matthew Fishman ", "Miles Stoudenmire "] -version = "0.3.0" +version = "0.3.1" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/examples/gate_evolution/Project.toml b/examples/gate_evolution/Project.toml new file mode 100644 index 0000000..a355267 --- /dev/null +++ b/examples/gate_evolution/Project.toml @@ -0,0 +1,3 @@ +[deps] +ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2" +ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5" diff --git a/examples/gate_evolution/mpo_gate_evolution.jl b/examples/gate_evolution/mpo_gate_evolution.jl index b64f170..c61813b 100644 --- a/examples/gate_evolution/mpo_gate_evolution.jl +++ b/examples/gate_evolution/mpo_gate_evolution.jl @@ -57,7 +57,7 @@ function main(; N=10, cutoff=1E-8, δt=0.1, ttotal=5.0) rho = apply(gates, rho; cutoff, apply_dag=true) t += δt end - @show inner(psi, rho, psi) + @show inner(psi', rho, psi) @show inner(psi, psi) @show tr(rho) diff --git a/examples/gate_evolution/trotter_suzuki_decomposition.jl b/examples/gate_evolution/trotter_suzuki_decomposition.jl deleted file mode 100644 index 6222470..0000000 --- a/examples/gate_evolution/trotter_suzuki_decomposition.jl +++ /dev/null @@ -1,32 +0,0 @@ -using ITensors, ITensorMPS - -function heisenberg(N) - os = Sum{Op}() - for j in 1:(N - 1) - os += "Sz", j, "Sz", j + 1 - os += 0.5, "S+", j, "S-", j + 1 - os += 0.5, "S-", j, "S+", j + 1 - end - return os -end - -function main(N; nsteps, order) - ℋ = heisenberg(N) - s = siteinds("S=1/2", N) - ψ₀ = MPS(s, n -> isodd(n) ? "↑" : "↓") - t = 1.0 - 𝒰 = exp(im * t * ℋ; alg=Trotter{order}(nsteps)) - U = Prod{ITensor}(𝒰, s) - H = ITensor(ℋ, s) - 𝒰ʳᵉᶠ = exp(im * t * ℋ) - Uʳᵉᶠ = ITensor(𝒰ʳᵉᶠ, s) - Uʳᵉᶠψ₀ = replaceprime(Uʳᵉᶠ * prod(ψ₀), 1 => 0) - return norm(prod(U(ψ₀)) - Uʳᵉᶠψ₀) -end - -@show main(4; nsteps=10, order=1) -@show main(4; nsteps=10, order=2) -@show main(4; nsteps=10, order=4) -@show main(4; nsteps=100, order=1) -@show main(4; nsteps=100, order=2) -@show main(4; nsteps=100, order=4)