From b0343c70a2d4647905d28705c73a63a94ac72b31 Mon Sep 17 00:00:00 2001 From: VicVanderLinden Date: Thu, 6 Nov 2025 20:23:49 +0100 Subject: [PATCH 1/2] Update_example_windowmps --- examples/windowmps.jl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/windowmps.jl b/examples/windowmps.jl index e05f17569..6226066d1 100644 --- a/examples/windowmps.jl +++ b/examples/windowmps.jl @@ -2,8 +2,8 @@ using MPSKit, MPSKitModels, TensorKit, Plots let #defining the hamiltonian - th = nonsym_ising_ham(; lambda = 0.3) - sx, sy, sz = nonsym_spintensors(1 // 2) + th = transverse_field_ising(; g = 0.3) + sx, sy, sz = σˣ(ComplexF64), σʸ(ComplexF64), σᶻ(ComplexF64) #initilizing a random mps ts = InfiniteMPS([ℂ^2], [ℂ^12]) @@ -23,11 +23,12 @@ let envs = environments(mpco, th) - szdat = [expectation_value(mpco, sz)] + szdat = [expectation_value(mpco, i => sz) for i in 1:length(mpco)] + szdat = [szdat,] for i in 1:(totaltime / deltat) - mpco, envs = timestep(mpco, th, deltat, TDVP2(; trscheme = truncrank(20)), envs) - push!(szdat, expectation_value(mpco, sz)) + mpco, envs = timestep(mpco, th, 0, deltat, TDVP2(; trscheme = truncbelow(10^(-8))& truncdim(25)), envs) + push!(szdat,[expectation_value(mpco, i => sz) for i in 1:length(mpco)]) end display(heatmap(real.(reduce((a, b) -> [a b], szdat)))) From a90996593d92c34f3023d46284d24bd794fd2037 Mon Sep 17 00:00:00 2001 From: VicVanderLinden <155101284+VicVanderLinden@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:13:37 +0100 Subject: [PATCH 2/2] Runic_fix --- examples/windowmps.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/windowmps.jl b/examples/windowmps.jl index 6226066d1..c8f56e45f 100644 --- a/examples/windowmps.jl +++ b/examples/windowmps.jl @@ -24,11 +24,11 @@ let envs = environments(mpco, th) szdat = [expectation_value(mpco, i => sz) for i in 1:length(mpco)] - szdat = [szdat,] + szdat = [szdat] for i in 1:(totaltime / deltat) - mpco, envs = timestep(mpco, th, 0, deltat, TDVP2(; trscheme = truncbelow(10^(-8))& truncdim(25)), envs) - push!(szdat,[expectation_value(mpco, i => sz) for i in 1:length(mpco)]) + mpco, envs = timestep(mpco, th, 0, deltat, TDVP2(; trscheme = truncbelow(10^(-8)) & truncdim(25)), envs) + push!(szdat, [expectation_value(mpco, i => sz) for i in 1:length(mpco)]) end display(heatmap(real.(reduce((a, b) -> [a b], szdat))))