Skip to content

Commit

Permalink
Fix ambiguity and restrictions on apply()
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Mar 8, 2024
1 parent 2aa2313 commit affa62c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/apply.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ function simple_update_bp(o, ψ, v⃗; envs, (observer!)=nothing, apply_kwargs..
end

function ITensors.apply(
o::ITensor,
ψ::Union{ITensorNetwork,TreeTensorNetwork};
o,
ψ::AbstractITensorNetwork;
envs=ITensor[],
normalize=false,
ortho=false,
Expand Down Expand Up @@ -297,9 +297,7 @@ end
#In the future we will try to unify this into apply() above but currently leave it mostly as a separate function
"""Apply() function for an ITN in the Vidal Gauge. Hence the bond tensors are required.
Gate does not necessarily need to be passed. Can supply an edge to do an identity update instead. Uses Simple Update procedure assuming gate is two-site"""
function ITensors.apply(
o::Union{ITensor,NamedEdge}, ψ::VidalITensorNetwork; normalize=false, apply_kwargs...
)
function ITensors.apply(o, ψ::VidalITensorNetwork; normalize=false, apply_kwargs...)
updated_ψ = copy(site_tensors(ψ))
updated_bond_tensors = copy(bond_tensors(ψ))
v⃗ = _gate_vertices(o, ψ)
Expand Down

0 comments on commit affa62c

Please sign in to comment.