diff --git a/src/FormNetworks/abstractformnetwork.jl b/src/FormNetworks/abstractformnetwork.jl index bb1b84be..8b6017c8 100644 --- a/src/FormNetworks/abstractformnetwork.jl +++ b/src/FormNetworks/abstractformnetwork.jl @@ -8,6 +8,7 @@ dual_index_map(f::AbstractFormNetwork) = not_implemented() tensornetwork(f::AbstractFormNetwork) = not_implemented() copy(f::AbstractFormNetwork) = not_implemented() derivative_vertices(f::AbstractFormNetwork) = not_implemented() +bra_ket_vertices(f::AbstractFormNetwork, state_vertices::Vector) = not_implemented() bra(f::AbstractFormNetwork) = induced_subgraph(f, collect(values(bra_vertex_map(f)))) ket(f::AbstractFormNetwork) = induced_subgraph(f, collect(values(ket_vertex_map(f)))) diff --git a/src/FormNetworks/quadraticformnetwork.jl b/src/FormNetworks/quadraticformnetwork.jl index 11309bad..845fc26f 100644 --- a/src/FormNetworks/quadraticformnetwork.jl +++ b/src/FormNetworks/quadraticformnetwork.jl @@ -62,6 +62,10 @@ function QuadraticFormNetwork( return QuadraticFormNetwork(operator, ket; kwargs...) end +function bra_ket_vertices(qf::QuadraticFormNetwork, state_vertices::Vector) + return vcat(bra_vertices(qf, state_vertices), ket_vertices(qf, state_vertices)) +end + function update(qf::QuadraticFormNetwork, state_vertex, state::ITensor) qf = copy(qf) state_inds = inds(state)