diff --git a/src/Quantum.jl b/src/Quantum.jl index 533cedb0f..5ce9751a1 100644 --- a/src/Quantum.jl +++ b/src/Quantum.jl @@ -108,7 +108,7 @@ Returns the sites of a [`Quantum`](@ref) Tensor Network. """ function sites(tn::Quantum; kwargs...) if isempty(kwargs) - collect(keys(tn.sites)) + sort!(collect(keys(tn.sites))) elseif keys(kwargs) === (:at,) findfirst(i -> i === kwargs[:at], tn.sites) else