sf.apps.data.sample.SampleDataset¶
-
class
SampleDataset
[source]¶ Bases:
abc.ABC
Base class for loading datasets of pre-generated samples.
-
n_mean
¶ mean number of photons in the GBS device
- Type
float
-
threshold
¶ flag to indicate whether samples are generated with threshold detection (i.e., detectors of zero or some photons) or with photon-number-resolving detectors.
- Type
bool
-
n_samples
¶ total number of samples in the dataset
- Type
int
-
modes
¶ number of modes in the GBS device or, equivalently, number of nodes in graph
- Type
int
-
data
¶ raw data of samples from GBS as a csr sparse array.
- Type
sparse
Attributes
Methods
counts
([axis])Count number of photons or clicks.
-
code/api/api/strawberryfields.apps.data.sample.SampleDataset
Download Python script
Download Notebook
View on GitHub