Skip to content

Commit

Permalink
Fix reference to lattice in adapt_structure for Ansatz
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Oct 29, 2024
1 parent e739d07 commit ca5ad64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/TenetAdaptExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ca5ad64

Please sign in to comment.