BosonSampling.ModeList
— TypeModeList(state)
ModeList(state,m)
Contrasting to ModeOccupation
this list is of size n
, the number of photons. Entry j
is the index of the mode occupied by photon j
.
This can also be used just to select modes for instance.
See also ModeOccupation
.
fields:
- n::Int
- m::Union{Int, Nothing}
- modes::Vector{Int}
BosonSampling.ModeOccupation
— TypeModeOccupation(state)
A list of the size of the number of modes m
, with entry j
of state
being the number of photons in mode j
. See also ModeList
.
fields:
- n::Int
- m::Int
- state::Vector{Int}
BosonSampling.Partition
— TypePartition(subsets::Vector{Subset})
Create a partition from multiple Subset
.
BosonSampling.PartitionOccupancy
— TypePartitionOccupancy(counts::ModeOccupation, n::Int, partition::Partition)
Fields: - counts::ModeOccupation - partition::Partition - n::Int - m::Int
BosonSampling.Subset
— TypeSubset(state::Vector{Int})
Create a mode occupation list with at most one count per mode.
Fields:
- n::Int
- m::Int
- subset::Vector{Int}
BosonSampling.ThresholdModeOccupation
— Typemutable struct ThresholdModeOccupation
Holds threshold detector clicks. Example
ThresholdModeOccupation(ModeList([1,2,4], 4))
BosonSampling.equilibrated_partition
— Methodequilibrated_partition(m,n_subsets)
Returns a most equilibratedpartition according to the principles of [`equilibratedpartition_vector`](@ref).
BosonSampling.equilibrated_partition_vector
— Methodequilibrated_partition_vector(m,n_subsets)
Returns a (most) equilibrated partition possible by euclidian division.
(a problem is that euclidian distribution may give nsubsets or nsubsets+1 if not done like below - here it is the most obvious thing I could think of to get a somewhat equilibrated partition with a constant number of subsets)
BosonSampling.first_modes
— Methodfirst_modes(n::Int, m::Int)
Create a ModeOccupation
with n
photons in the first sites of m
modes.
BosonSampling.is_compatible
— Method is_compatible(target_modes_in::ModeList, target_modes_out::ModeList)
Checks compatibility of ModeList
s.
BosonSampling.last_modes
— Methodlast_modes(n::Int, m::Int)
Create a ModeOccupation
with n
photons in the last sites of m
modes.
BosonSampling.number_modes_occupied
— Method number_modes_occupied(mo::ModeOccupation)
Number of modes having at least a photon.
BosonSampling.occupies_all_modes
— Methodoccupies_all_modes(part::Partition)
Check wether a partition occupies all modes or not.
BosonSampling.partition_from_subset_lengths
— Methodpartition_from_subset_lengths(subset_lengths)
Return a partition from a vector of subset lengths.
BosonSampling.to_threshold
— Methodto_threshold(mo::ModeOccupation)
Converts a ModeOccupation
into threshold detection.