Boson Sampling State¶
- class SamplingState(d: int, connector: BaseConnector, config: Config | None = None)¶
- Parameters:
d (int) – The number of modes.
connector (BaseConnector) – Instance containing calculation functions.
config (Config) – Instance containing constants for the simulation.
- validate() None¶
Validates the current state.
- Raises:
InvalidState – If the interferometer matrix is non-unitary, or the input state is invalid.
- property d¶
The number of modes.
- get_particle_detection_probability(occupation_number: ndarray) float¶
Returns the particle number detection probability using the occupation number specified as a parameter.