Skip to content

Commit

Permalink
fix Base.show(::IOContext, ::FiniteMPS) edgecases
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorVanthilt committed Dec 19, 2024
1 parent 8c118d3 commit da5eba3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/states/finitemps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,13 @@ function Base.show(io::IOContext, ψ::FiniteMPS)
charset.mid
end, charset.dash, " AC[$(Int(site))]: ", ψ.ACs[Int(site)])
else # center is a bond-tensor
println(io, site == HalfInt(L + 1 / 2) ? charset.start : charset.ver,
" C[$(Int(site+1/2))]: ",
ψ.Cs[Int(site + 1 / 2)])
println(io, if site == HalfInt(L + 1 / 2)
charset.start
elseif site == HalfInt(1/2)
charset.stop
else
charset.ver
end, " C[$(Int(site-1/2))]: ", ψ.Cs[Int(site + 1 / 2)])
end
else
if isinteger(site)
Expand Down

0 comments on commit da5eba3

Please sign in to comment.