BosonSampling.at_most_one_photon_per_bin — Methodat_most_one_photon_per_bin(occupancy_vector::Vector{Int})
check_at_most_one_particle_per_mode(occ)Check wether occupancy_vector contains more than one photon per site.
BosonSampling.bosonic_amplitude — Functionbosonic_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.
BosonSampling.bosonic_probability — Methodbosonic_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.
BosonSampling.check_full_threshold_distribution — Methodcheck_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.
BosonSampling.check_suppression_law — Methodcheck_suppression_law(event)Check if the event is suppressed according to the rule.
BosonSampling.compute_probability! — Methodcompute_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.
BosonSampling.compute_probability! — Methodcompute_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.BosonSampling.compute_threshold_detection_probability — Methodcompute_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.
BosonSampling.distinguishable_probability — Functiondistinguishable_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.
BosonSampling.fill_arrangement — Methodfill_arrangement(occupation_vector)
fill_arrangement(r::ModeOccupation)
fill_arrangement(input::Input)Convert a mode occupation list to a mode assignement.
BosonSampling.is_collisionless — Methodis_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.
BosonSampling.iterate_until_collisionless — Methoditerate_until_collisionless(f)Sample f until the result is collisionless.
BosonSampling.mode_occupancy_to_occupancy_vector — Methodmode_occupancy_to_occupancy_vector(mo::Vector{Int}, m::Int)Goes from [2,2,5] to 0,2,0,0,1,0.
BosonSampling.occupancy_vector_to_mode_occupancy — Methodoccupancy_vector_to_mode_occupancy(occupancy_vector)Return a partition of occupied modes from an occupancy_vector.
BosonSampling.occupancy_vector_to_partition — Methodoccupancy_vector_to_partition(occupancy_vector)
occupancy_vector_to_mode_occupancy(occupancy_vector)Return a partition of occupied modes from an occupancy_vector.
BosonSampling.output_mode_occupation — Methodoutput_mode_occupation(n::Int, m::Int)Return all possible configurations of n photons among m modes.
BosonSampling.process_probability_partial — Methodprocess_probability_partial(U, S, input_state, output_state)
process_probability_partial(interf::Interferometer, input_state::Input{TIn} where {TIn<:PartDist},output_state::FockDetection)Compute the probability to go from input_state to output_state through the interferometer U in the PartDist case where partial distinguishable is described by the GramMatrix S.
BosonSampling.random_mode_occupation — Methodrandom_mode_occupation(n::Int, m::Int)Create a ModeOccupation from a mode occupation list of n ramdomly placed ones among m sites.
BosonSampling.random_mode_occupation_collisionless — Methodrandom_mode_occupation_collisionless(n::Int, m::Int)Create a ModeOccupation from a random mode occupation that is likely collisionless.
BosonSampling.random_occupancy — Methodrandom_occupancy(n::Int, m::Int)Return a vector of size m with n randomly placed ones.
BosonSampling.scattering_matrix — Methodscattering_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.