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
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ITensorBase"
uuid = "4795dd04-0d67-49bb-8f44-b89c448a1dc7"
version = "0.9.0"
version = "0.9.1"
authors = ["ITensor developers <support@itensor.org> and contributors"]

[workspace]
Expand Down Expand Up @@ -52,7 +52,7 @@ Mooncake = "0.4.202, 0.5"
OrderedCollections = "1.6"
Random = "1.10"
SimpleTraits = "0.9.4"
TensorAlgebra = "0.12.4, 0.13"
TensorAlgebra = "0.13.4"
TensorOperations = "5.3.1"
TermInterface = "2"
TupleTools = "1.6"
Expand Down
6 changes: 6 additions & 0 deletions src/index.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Accessors: @set
using Random: AbstractRNG, RandomDevice
using TensorAlgebra: TensorAlgebra as TA
using UUIDs: UUID, uuid4

tagpairstring(pair::Pair) = string(first(pair)) * "=>" * string(last(pair))
Expand Down Expand Up @@ -39,6 +40,11 @@ function uniquename(rng::AbstractRNG, ::Type{<:IndexName})
return IndexName(rng)
end

# Derive contractions on integer labels: an `IndexName` carries an id and a tag dictionary and is
# far costlier to compare than an integer, and deriving a contraction makes several comparison
# passes over the labels. See `TensorAlgebra.label_type`.
TA.label_type(::Type{<:IndexName}) = Int

to_symbol_pair(p::Pair) = Symbol(first(p)) => Symbol(last(p))

# Like `Dict`, accept one or more bare `Pair`s as tags. A `Pair` iterates over
Expand Down
Loading