Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ITensorMPS"
uuid = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2"
authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"]
version = "0.3.23"
version = "0.3.24"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
7 changes: 5 additions & 2 deletions examples/finite_temperature/metts.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using ITensors, ITensorMPS
using Printf
using Random: rand

#=

Expand Down Expand Up @@ -50,8 +51,9 @@ function main(; N = 10, cutoff = 1.0e-8, δτ = 0.1, beta = 2.0, NMETTS = 3000,
# Make y-rotation gates to use in METTS collapses
Ry_gates = ops([("Ry", n, (θ = π / 2,)) for n in 1:N], s)

# Arbitrary initial state
psi = random_mps(s)
# Arbitrary initial Z-product state
init_state = rand(["Z+", "Z-"], N)
psi = MPS(s, init_state)

# Make H for measuring the energy
terms = OpSum()
Expand Down Expand Up @@ -108,6 +110,7 @@ function main(; N = 10, cutoff = 1.0e-8, δτ = 0.1, beta = 2.0, NMETTS = 3000,
samp = sample!(psi)
new_state = [samp[j] == 1 ? "Z+" : "Z-" for j in 1:N]
end
@printf(" Next Product State = %s\n", new_state)
psi = MPS(s, new_state)
end

Expand Down
Loading