@benoitseron As I was saying the changes are from this line and the definition of GramMatrix above. Do you agree to define Input in this way?
It is a small change just to avoid repetitive stuff as
G = GramMatrix{ToyModel}(n, gram_matrix_toy_model(n, x))input = Input{ToyModel}(first_modes(n,m), G)
https://github.com/benoitseron/BosonSampling.jl/blob/ce4d1918a416c5aa6818d46e8c03452a30021779/src/types/input.jl#L60
@benoitseron As I was saying the changes are from this line and the definition of
GramMatrix
above. Do you agree to defineInput
in this way? It is a small change just to avoid repetitive stuff asG = GramMatrix{ToyModel}(n, gram_matrix_toy_model(n, x))
input = Input{ToyModel}(first_modes(n,m), G)
which now will simply be
input = Input{ToyModel}(first_modes(n,m), distinguishability)
.This allows also to have (almost) the same args of the functions
classical_sampler(;input::Input, interf::Interferometer) = classical_sampler(interf.U, input.n, input.m)
function cliffords_sampler(;input::Input, interf::Interferometer)
function noisy_sampler(;input::Input, reflectivity::Real, interf::Interferometer)
function noisy_distribution(;input::Input, reflectivity::Real, interf::Interferometer, exact=true, approx=true, samp=true)
function theoretical_distribution(;input::Input, interf::Interferometer, i=nothing)
In addition, I still think that defining
Input
in this way won't make things more difficult when implementing others kind of states