From cf1e00f5d44a818853479930114830f4f5eb1ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= Date: Thu, 26 Dec 2024 11:56:42 +0100 Subject: [PATCH] fix call to `copy` on tuple of inds --- ext/TenetReactantExt.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/TenetReactantExt.jl b/ext/TenetReactantExt.jl index 97758b03..12880d08 100644 --- a/ext/TenetReactantExt.jl +++ b/ext/TenetReactantExt.jl @@ -13,7 +13,7 @@ function Reactant.make_tracer( seen, @nospecialize(prev::RT), path::Tuple, mode::Reactant.TraceMode; kwargs... ) where {RT<:Tensor} tracedata = Reactant.make_tracer(seen, parent(prev), Reactant.append_path(path, :data), mode; kwargs...) - return Tensor(tracedata, copy(inds(prev))) + return Tensor(tracedata, inds(prev)) end function Reactant.make_tracer(seen, prev::TensorNetwork, path::Tuple, mode::Reactant.TraceMode; kwargs...) @@ -51,7 +51,7 @@ end function Reactant.create_result(@nospecialize(tocopy::Tensor), @nospecialize(path), result_stores) data = Reactant.create_result(parent(tocopy), Reactant.append_path(path, :data), result_stores) - return :($Tensor($data, $(copy(inds(tocopy))))) + return :($Tensor($data, $(inds(tocopy)))) end function Reactant.create_result(tocopy::TensorNetwork, @nospecialize(path), result_stores)