Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Mar 28, 2024
1 parent 97faef8 commit b258438
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/solvers/contract.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
using Graphs: nv, vertices
using ITensors: ITensors, linkinds, sim
using ITensors.NDTensors: Algorithm, @Algorithm_str, contract
using NamedGraphs: vertextype

function sum_contract(
::Algorithm"fit",
tns::Vector{<:Tuple{<:AbstractTTN,<:AbstractTTN}};
Expand Down Expand Up @@ -66,7 +71,7 @@ end
"""
Overload of `ITensors.apply`.
"""
function apply(tn1::AbstractTTN, tn2::AbstractTTN; init, kwargs...)
function ITensors.apply(tn1::AbstractTTN, tn2::AbstractTTN; init, kwargs...)
if !isone(plev_diff(flatten_external_indsnetwork(tn1, tn2), external_indsnetwork(init)))
error(
"Initial guess `init` needs to primelevel one less than the contraction tn1 and tn2."
Expand Down
3 changes: 3 additions & 0 deletions src/tensornetworkoperators.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
using ITensors: ITensors, commoninds, product
using LinearAlgebra: factorize

"""
Take a vector of gates which act on different edges/ vertices of an Inds network and construct the tno which represents prod(gates).
"""
Expand Down

0 comments on commit b258438

Please sign in to comment.