benoitseron / BosonSampling.jl

Boson sampling tools for Julia
MIT License
26 stars 5 forks source link

New args for Input #43

Closed AntoineRestivo closed 2 years ago

AntoineRestivo commented 2 years ago

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 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)

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

In addition, I still think that defining Input in this way won't make things more difficult when implementing others kind of states