sf.utils¶
This package defines and implements several utility functions and language extensions that complement StrawberryFields.
Functions¶
|
The Fock state probabilities for the specified modes obtained from PNR samples. |
|
Returns the cat state |
|
Returns the coherent state |
|
Returns the squeezed coherent state |
|
Numerical array representation of the channel corresponding to a quantum circuit. |
|
Numerical array representation of a unitary quantum circuit. |
|
Returns the Fock state |
|
Simulation time of a GBS sample (cf. |
|
Simulation time of a GBS sample (cf. |
|
True iff all the operations in the program can be represented as quantum channels. |
|
True iff all the operations in the program are unitary. |
|
Calculates and returns the number of nonzero events |
|
Normally distributed array of random complex numbers. |
|
Random covariance matrix. |
|
Random unitary matrix representing an interferometer. |
|
Random symplectic matrix representing a Gaussian transformation. |
|
Uses samples obtained by a measurement operator to return the expectation value of the operator. |
|
Uses samples obtained by a measurement operator to return the expectation value of the operator. |
|
Returns the squeezed covariance matrix of a squeezed state |
|
Returns the squeezed state |
|
Returns the vacuum state |