sf.apps.train.prob_photon_sample¶
-
prob_photon_sample
(A, sample)[source]¶ Calculate the probability of a sample of photon counts.
The input adjacency matrix must have singular values not exceeding one. This can be achieved by rescaling an arbitrary adjacency matrix using
rescale_adjacency()
.- Parameters
A (array) – the adjacency matrix
sample (array) – the sample
- Returns
the probability
- Return type
float
code/api/api/strawberryfields.apps.train.prob_photon_sample
Download Python script
Download Notebook
View on GitHub