diff --git a/Project.toml b/Project.toml index 3af3b67..00bf323 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "ITensorNetworksNext" uuid = "302f2e75-49f0-4526-aef7-d8ba550cb06c" -version = "0.9.8" +version = "0.9.9" authors = ["ITensor developers and contributors"] [workspace] @@ -36,7 +36,7 @@ Combinatorics = "1" DataGraphs = "0.5" Dictionaries = "0.4.5" Graphs = "1.13.1" -ITensorBase = "0.10, 0.11, 0.12" +ITensorBase = "0.13" LinearAlgebra = "1.10" MacroTools = "0.5.16" MatrixAlgebraKit = "0.6" diff --git a/src/ITensorNetworkGenerators/ising_network.jl b/src/ITensorNetworkGenerators/ising_network.jl index 803adff..65f054b 100644 --- a/src/ITensorNetworkGenerators/ising_network.jl +++ b/src/ITensorNetworkGenerators/ising_network.jl @@ -1,6 +1,6 @@ using ..ITensorNetworksNext using Graphs: degree, dst, edges, src -using ITensorBase: apply, name, operator, uniquename +using ITensorBase: name, nameddims, uniquename using LinearAlgebra: Diagonal, eigen using NamedGraphs.GraphsExtensions: vertextype @@ -43,9 +43,11 @@ function ising_network( deg2 = degree(tn, v2) m = sqrt_ising_bond(β; J, h, deg1, deg2) - t = operator(m, (name(fp(e)),), (name(f(e)),)) - tn[v1] = apply(t, tn[v1]) - tn[v2] = apply(t, tn[v2]) + # Split the Ising bond as √b on each endpoint, contracting the delta-network bond + # name `fp(e)` and renaming the shared bond to the requested name `f(e)`. + b = nameddims(m, (name(fp(e)), name(f(e)))) + tn[v1] = b * tn[v1] + tn[v2] = b * tn[v2] end return tn end diff --git a/src/apply/apply_operators.jl b/src/apply/apply_operators.jl index 74836b8..a885ca9 100644 --- a/src/apply/apply_operators.jl +++ b/src/apply/apply_operators.jl @@ -3,7 +3,7 @@ using AlgorithmsInterface: AlgorithmsInterface as AI using Base: @kwdef using Graphs: dst, src, vertices using ITensorBase: - ITensorBase as ITB, AbstractITensor, dimnames, domainnames, operator, replacedimnames + ITensorBase as ITB, AbstractITensor, dimnames, inputnames, operator, replacedimnames using LinearAlgebra: norm using MatrixAlgebraKit: qr_compact, svd_trunc using NamedGraphs.GraphsExtensions: all_edges, boundary_edges @@ -209,7 +209,7 @@ function apply_gate_bp!( dest::AbstractITensorNetwork, op::AbstractITensor, state::AbstractITensorNetwork, env; kwargs... ) - op_in = domainnames(op) + op_in = inputnames(op) vs = [v for v in vertices(state) if !isempty(intersect(op_in, sitenames(state, v)))] isempty(vs) && throw( ArgumentError("operator shares no indices with the tensor network") diff --git a/test/Project.toml b/test/Project.toml index ca405a2..0711602 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -31,7 +31,7 @@ DataGraphs = "0.5" Dictionaries = "0.4.5" GradedArrays = "0.13.2" Graphs = "1.13.1" -ITensorBase = "0.10, 0.11, 0.12" +ITensorBase = "0.13" ITensorNetworksNext = "0.9" ITensorPkgSkeleton = "0.3.42" MatrixAlgebraKit = "0.6"