diff --git a/docs/src/AdvancedUsageGuide.md b/docs/src/AdvancedUsageGuide.md index 47e8071241..480e3dd375 100644 --- a/docs/src/AdvancedUsageGuide.md +++ b/docs/src/AdvancedUsageGuide.md @@ -756,8 +756,8 @@ Advanced users might notice something strange about the definition of the ITensor type, that it is often not "type stable". Some of this is by design. The definition for ITensor is: ```julia -mutable struct ITensor{N} - inds::IndexSet{N} +mutable struct ITensor + inds::IndexSet store::TensorStorage end ``` @@ -774,7 +774,7 @@ julia> A = randomITensor(i, i'); julia> @code_warntype A[i=>1, i'=>2] Variables #self#::Core.Compiler.Const(getindex, false) - T::ITensor{1} + T::ITensor ivs::Tuple{Pair{Index{Int64},Int64}} p::Tuple{Union{Nothing, Int64}} vals::Tuple{Any} @@ -789,7 +789,7 @@ Body::Number │ %7 = Base.broadcasted(ITensors.val, ivs)::Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Nothing,typeof(val),Tuple{Tuple{Pair{Index{Int64},Int64}}}} │ %8 = Base.materialize(%7)::Tuple{Int64} │ (vals = (%6)(%8, p)) -│ %10 = Core.tuple(T)::Tuple{ITensor{1}} +│ %10 = Core.tuple(T)::Tuple{ITensor} │ %11 = Core._apply_iterate(Base.iterate, Base.getindex, %10, vals)::Number │ %12 = Core.typeassert(%11, ITensors.Number)::Number └── return %12 diff --git a/docs/src/ITensorType.md b/docs/src/ITensorType.md index 94a0ee2a42..bd0e65c525 100644 --- a/docs/src/ITensorType.md +++ b/docs/src/ITensorType.md @@ -53,17 +53,17 @@ delta(::Type{<:Number}, ::QN, ::ITensors.Indices) ## Convert to Array ```@docs -Array{ElT, N}(::ITensor{N}, ::Vararg{Index, N}) where {ElT, N} +Array{ElT, N}(::ITensor, ::Vararg{Index, N}) where {ElT, N} array(::ITensor) -matrix(::ITensor{2}) -vector(::ITensor{1}) +matrix(::ITensor) +vector(::ITensor) ``` ## Getting and setting elements ```@docs getindex(::ITensor, ::Any...) -getindex(::ITensor{N}, ::Vararg{Int,N}) where {N} +getindex(::ITensor, ::Vararg{Int,N}) where {N} setindex!(::ITensor, ::Number, ::Any...) setindex!(::ITensor, ::Number, ::Int...) ``` diff --git a/docs/src/index.md b/docs/src/index.md index 5a46851ba9..f1c43afad4 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -299,7 +299,7 @@ It originates in physics with the purpose of finding eigenvectors of Hamiltonian (energy) matrices which model the behavior of quantum systems. -```jldoctest; output=false, filter=[r"After sweep [1-5] energy=\-[0-9]{3}\.[0-9]{10,16} maxlinkdim=[0-9]{1,3} time=[0-9]{1,2}\.[0-9]{3}", r"Final energy = \-138\.[0-9]{10,16}"] +```jldoctest; output=false, filter=[r"After sweep [1-5] energy=\-[0-9]{3}\.[0-9]{10,16} maxlinkdim=[0-9]{1,3} maxerr=[0-9]{1,2}\.[0-9]{1,3}E\-[0-9]{1,2} time=[0-9]{1,2}\.[0-9]{3}", r"Final energy = \-138\.[0-9]{10,16}"] using ITensors let # Create 100 spin-one indices @@ -347,11 +347,10 @@ sweeps = Sweeps 4 cutoff=1.0E-10, maxdim=100, mindim=1, noise=0.0E+00 5 cutoff=1.0E-10, maxdim=200, mindim=1, noise=0.0E+00 -After sweep 1 energy=-137.845841178879 maxlinkdim=9 time=8.538 -After sweep 2 energy=-138.935378608196 maxlinkdim=20 time=0.316 -After sweep 3 energy=-138.940079710492 maxlinkdim=88 time=1.904 -After sweep 4 energy=-138.940086018149 maxlinkdim=100 time=4.179 -After sweep 5 energy=-138.940086075413 maxlinkdim=96 time=4.184 -Final energy = -138.94008607296038 +After sweep 1 energy=-137.954199761732 maxlinkdim=9 maxerr=2.43E-16 time=9.356 +After sweep 2 energy=-138.935058943878 maxlinkdim=20 maxerr=4.97E-06 time=0.671 +After sweep 3 energy=-138.940080155429 maxlinkdim=92 maxerr=1.00E-10 time=4.522 +After sweep 4 energy=-138.940086009318 maxlinkdim=100 maxerr=1.05E-10 time=11.644 +After sweep 5 energy=-138.940086058840 maxlinkdim=96 maxerr=1.00E-10 time=12.771 +Final energy = -138.94008605883985 ``` -