@@ -439,65 +439,6 @@ Compute the dimension of the maximal virtual space at a given site.
439439"""
440440max_Ds (ψ:: FiniteMPS ) = dim .(max_virtualspaces (ψ))
441441
442- function Base. summary (io:: IO , ψ:: FiniteMPS )
443- L = length (ψ)
444- D = maximum (dim, left_virtualspace (ψ))
445- return print (io, " $L -site FiniteMPS ($(scalartype (ψ)) , $(TensorKit. type_repr (spacetype (ψ))) ) maxdim: " , D, " \t center: " , ψ. center)
446- end
447- function Base. show (io:: IO , :: MIME"text/plain" , ψ:: FiniteMPS )
448- summary (io, ψ)
449- get (io, :compact , false ):: Bool && return nothing
450-
451- println (io, " :" )
452- io = IOContext (io, :typeinfo => spacetype (ψ))
453-
454- limit = get (io, :limit , true ):: Bool
455- half_screen_rows = limit ? div (displaysize (io)[1 ] - 2 , 4 ) : typemax (Int)
456- L = length (ψ)
457- if L <= 2 * half_screen_rows # everything fits!
458- half_screen_rows = typemax (Int)
459- end
460-
461- # special handling of edge spaces => don't print if trivial
462- Vright = right_virtualspace (ψ, L)
463- right_trivial = Vright == oneunit (Vright)
464- Vleft = left_virtualspace (ψ, 1 )
465- left_trivial = Vleft == oneunit (Vleft)
466-
467-
468- right_trivial || println (io, " │ " , Vright)
469- for i in reverse (1 : L)
470- if i > L - half_screen_rows
471- if i == L
472- connector = right_trivial ? " ┌" : " ├"
473- println (io, connector, " ─[$i ]─ " , physicalspace (ψ, i))
474- elseif i == 1
475- connector = left_trivial ? " └" : " ├"
476- println (io, connector, " ─[$i ]─ " , physicalspace (ψ, i))
477- else
478- println (io, " ├─[$i ]─ " , physicalspace (ψ, i))
479- end
480-
481- i != 1 && println (io, " │ " , left_virtualspace (ψ, i))
482- elseif i == half_screen_rows
483- println (io, " │ ⋮" )
484- elseif i < half_screen_rows
485- i != L && println (io, " │ " , right_virtualspace (ψ, i))
486- if i == L
487- connector = right_trivial ? " ┌" : " ├"
488- println (io, connector, " ─[$i ]─ " , physicalspace (ψ, i))
489- elseif i == 1
490- connector = left_trivial ? " └" : " ├"
491- println (io, connector, " ─[$i ]─ " , physicalspace (ψ, i))
492- else
493- println (io, " ├─[$i ]─ " , physicalspace (ψ, i))
494- end
495- end
496- end
497- left_trivial || println (io, " │ " , Vleft)
498-
499- return nothing
500- end
501442
502443#= ==========================================================================================
503444Linear Algebra
0 commit comments