diff --git a/src/harmonic_oscillator.jl b/src/harmonic_oscillator.jl index 783b1e2..0713ad1 100644 --- a/src/harmonic_oscillator.jl +++ b/src/harmonic_oscillator.jl @@ -109,9 +109,12 @@ module HarmonicOscillator qsamples = vec(collect.(collect(Base.Iterators.product(qs...)))) psamples = vec(collect.(collect(Base.Iterators.product(ps...)))) - samples = vec(collect(Base.Iterators.product(qsamples, psamples))) + zsamples = Base.Iterators.product(qsamples, psamples) - (q = qsamples, p = psamples) + return ( + q = vec([zs[1] for zs in zsamples]), + p = vec([zs[2] for zs in zsamples]), + ) end