BosonSampling.bosonic_amplitudeFunction
bosonic_amplitude(U, input_state, output_state, permanent=ryser)
process_amplitude(U, input_state, output_state, permanent=ryser)

Compute the probability amplitude to go from input_state to output_state through the interferomter U in the Bosonic case.

source
BosonSampling.bosonic_probabilityMethod
bosonic_probability(U, input_state, output_state)
process_probability(U, input_state, output_state)

Compute the probability to go from input_state to output_state through the interferometer U in the Bosonic case.

source
BosonSampling.check_full_threshold_distributionMethod
check_full_threshold_distribution(ev::Event)

Computes the full Boson Sampling distribution encompassed by the parameters held in ev (regardless of the detection information). Used the method of the ThresholdDetection listed and computed one by one, and does the same by considering every possible FockDetection and only then thresholdising and grouping into equivalent threshdold detections. Is used as a safety check for the functions computing the ThreshdoldDetections.

source
BosonSampling.compute_probability!Method
compute_probability(ev::Event{TIn, TOut}) where {TIn<:InputType, TOut<:FockDetection}
compute_probability(ev::Event{TIn, TOut}) where {TIn<:InputType, TOut<:ThresholdFockDetection}

Given an Event, gives the probability to get the outcome TOut when TIn passes though the interferometer ev.interferometer.

source
BosonSampling.compute_probability!Method
compute_probability!(ev::Event{TIn, TOut}) where {TIn<:InputType, TOut<:ThresholdFockDetection}

Like other functions oths the same name, but for threshold detection.

!!! Warning This computes the probability linked to a physical, threshold detection: if n = 2 and giving a threshold detection such as state = 1,0,0,1, the information on the last two modes will be disregarded and give the same probability as if passing state = [1,0,0,0] as it will sum over all possible configurations of the last two modes.

This is so because of the way the lossy modes are stored.
source
BosonSampling.compute_threshold_detection_probabilityMethod
compute_threshold_detection_probability(ev::Event{<:InputType,<:ThresholdFockDetection})

Compute the probability of a threshold detection event. This is done by computing the probabilities of all possible number of photons detected, and then summing the probabilities of the number of photons detected up to the number of photons in the input state. This uses the partition formalism to make this summation much faster than a direct computation.

Also works with loss.

source
BosonSampling.distinguishable_probabilityFunction
distinguishable_probability(U, input_state, output_state, permanent=ryser)
process_probability_distinguishable(U, input_state, output_state, permanent=ryser)

Compute the probability to go from input_state to output_state through the interferomter U in the Distinguishable case.

source
BosonSampling.fill_arrangementMethod
fill_arrangement(occupation_vector)
fill_arrangement(r::ModeOccupation)
fill_arrangement(input::Input)

Convert a mode occupation list to a mode assignement.

source
BosonSampling.is_collisionlessMethod
is_collisionless(r)
is_collisionless(i::Input)
is_collisionless(r::ModeOccupation)
is_collisionless(r::ThresholdModeOccupation, n_in::Int)

Tells if an event contains more than one photon in an input bin.

For ThresholdModeOccupation, this is infered knowing the input number of photons.

source
BosonSampling.scattering_matrixMethod
scattering_matrix(U::Matrix, input_state::Vector{Int}, output_state::Vector{Int})
scattering_matrix(U::Interferometer, r::ModeOccupation, s::ModeOccupation)
scattering_matrix(U::Interferometer, i::Input, o::FockDetection)

Return the submatrix of U whose rows and columns are respectively defined by input_state and output_state.

source