Skip to content

Commit

Permalink
Experimental QN itensor constructor, having issues with this
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Sep 15, 2023
1 parent 4eb3374 commit a93b008
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/itensor/qnitensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,15 @@ ITensor(x::RealOrComplex{Int}, flux::QN, is...) = ITensor(float(x), flux, is...)

ITensor(eltype::Type{<:Number}, x::Number, is::QNIndices) = ITensor(eltype, x, QN(), is)

function ITensor(
as::AliasStyle, A::AbstractArray{ElT}, is::QNIndices; kwargs...
) where {ElT<:Number}
@show is
tol = haskey(kwargs, :tol) ? kwargs[:tol] : 0.0
checkflux = haskey(kwargs, :checkflux) ? kwargs[:checkflux] : true
return ITensor(as, ElT, A, is)
end

"""
ITensor([ElT::Type, ]::AbstractArray, inds; tol=0.0, checkflux=true)
Expand Down

0 comments on commit a93b008

Please sign in to comment.