Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 = "ITensorBase"
uuid = "4795dd04-0d67-49bb-8f44-b89c448a1dc7"
authors = ["ITensor developers <support@itensor.org> and contributors"]
version = "0.1.4"
version = "0.1.5"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Expand Down
11 changes: 8 additions & 3 deletions src/quirks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@ dag(i::Index) = i
# TODO: Define this properly.
dag(a::ITensor) = a
# TODO: Deprecate.
dim(i::Index) = dename(length(i))
# Conversion to `Int` is used in case the output is named.
dim(i::Index) = Int(length(i))
# TODO: Deprecate.
dim(a::AbstractITensor) = unname(length(a))
# Conversion to `Int` is used in case the output is named.
dim(a::AbstractITensor) = Int(length(a))
# TODO: Define this properly.
hasqns(i::Index) = false
# TODO: Define this properly.
hasqns(i::AbstractITensor) = false
# TODO: Deprecate.
# TODO: Deprecate, and/or decide on aliasing behavior of `ITensor`.
itensor(parent::AbstractArray, nameddimsindices) = ITensor(parent, nameddimsindices)
function itensor(parent::AbstractArray, i1::Index, i_rest::Index...)
return ITensor(parent, (i1, i_rest...))
end
# TODO: Deprecate.
order(a::AbstractArray) = ndims(a)
# TODO: Deprecate.
using NamedDimsArrays: aligndims
permute(a::AbstractITensor, dimnames) = aligndims(a, dimnames)

# This seems to be needed to get broadcasting working.
# TODO: Investigate this and see if we can get rid of it.
Expand Down
Loading