sf.apps.data.GraphDataset

class GraphDataset[source]

Bases: strawberryfields.apps.data.Dataset, abc.ABC

Class for loading datasets of pre-generated samples from graphs.

adj

adjacency matrix of the graph from which samples were generated

Type

array

n_mean

rtype

float

threshold

rtype

bool

n_mean
Return type

float

threshold
Return type

bool

counts([axis])

Count number of photons or clicks.

counts(axis=1)

Count number of photons or clicks.

Counts number of photons/clicks in each sample (axis==1) or number of photons/clicks in each mode compounded over all samples (axis==0).

Parameters

axis (int) – axis to perform count

Returns

counts from samples

Return type

list