Skip to content

Commit

Permalink
Update src/FormNetworks/quadraticformnetwork.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Fishman <[email protected]>
  • Loading branch information
JoeyT1994 and mtfishman authored Feb 12, 2024
1 parent 29efcc1 commit 80a2f36
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/FormNetworks/quadraticformnetwork.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ function update(qf::QuadraticFormNetwork, state_vertex, state::ITensor)
qf = copy(qf)
state_inds = inds(state)
state_dag = replaceinds(dag(state), state_inds, dual_index_map(qf).(state_inds))
# TODO: Maybe add a check that it really does preserve the graph.
setindex_preserve_graph!(tensornetwork(qf), state, ket_vertex_map(qf)(state_vertex))
setindex_preserve_graph!(tensornetwork(qf), state_dag, bra_vertex_map(qf)(state_vertex))
return qf
Expand Down

0 comments on commit 80a2f36

Please sign in to comment.