From ca5ad64d05c1e7936bb7fe113807487950038e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= Date: Thu, 26 Sep 2024 17:58:15 -0400 Subject: [PATCH] Fix reference to lattice in `adapt_structure` for `Ansatz` --- ext/TenetAdaptExt.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/TenetAdaptExt.jl b/ext/TenetAdaptExt.jl index 4370502e..b3d09b0e 100644 --- a/ext/TenetAdaptExt.jl +++ b/ext/TenetAdaptExt.jl @@ -7,6 +7,6 @@ Adapt.adapt_structure(to, x::Tensor) = Tensor(adapt(to, parent(x)), inds(x)) Adapt.adapt_structure(to, x::TensorNetwork) = TensorNetwork(adapt.(Ref(to), tensors(x))) Adapt.adapt_structure(to, x::Quantum) = Quantum(adapt(to, TensorNetwork(x)), x.sites) -Adapt.adapt_structure(to, x::Ansatz) = Ansatz(adapt(to, Quantum(x)), lattice(x)) +Adapt.adapt_structure(to, x::Ansatz) = Ansatz(adapt(to, Quantum(x)), Tenet.lattice(x)) end