From 4067de04b1936c700bd7148ed00fed8ce1e30c7a Mon Sep 17 00:00:00 2001 From: Joey Date: Thu, 7 Mar 2024 14:46:14 -0600 Subject: [PATCH] Fix Data Graph Type --- src/gauging.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gauging.jl b/src/gauging.jl index 50bfb599..16e05831 100644 --- a/src/gauging.jl +++ b/src/gauging.jl @@ -11,7 +11,9 @@ site_tensors(ψ::VidalITensorNetwork) = ψ.itensornetwork bond_tensors(ψ::VidalITensorNetwork) = ψ.bond_tensors bond_tensor(ψ::VidalITensorNetwork, e) = bond_tensors(ψ)[e] -data_graph_type(TN::Type{VidalITensorNetwork}) = data_graph_type(site_tensors(TN)) +function data_graph_type(TN::Type{<:VidalITensorNetwork}) + return data_graph_type(fieldtype(TN, :itensornetwork)) +end data_graph(ψ::VidalITensorNetwork) = data_graph(site_tensors(ψ)) function copy(ψ::VidalITensorNetwork) return VidalITensorNetwork(copy(site_tensors(ψ)), copy(bond_tensors(ψ)))