Class Gaussian¶
Defined in File BlackbirdProgram.h
Inheritance Relationships¶
Base Type¶
public blackbird::Operation
(Class Operation)
Class Documentation¶
-
class blackbird::Gaussian : public blackbird::Operation¶
Represents a Gaussian state For more details, see the Strawberry Fields convention page.
This operation intializes a Gaussian state as a covaraince matrix and vector of means, ready to be decomposed into initial thermal state, displacements, squeezers, beamsplitters, and rotation gates.
Covariance matrix \(V\) and vector of means \(r\) accessible via:
\(V\):
Gaussian->S1
\(r\):
Gaussian->S2
Public Functions
-
inline Gaussian(floatmat cov, floatmat means, intvec m)¶
Constructor to initialize a Gaussian state on modes
m
- Parameters
cov –
vector<vector<double>>
representing the covariance matrixmeans – single row
vector<vector<double>>
array representing the vector of meansm –
vector<int>
containing the list of modes the gate acts on
- Throws
invalid_argument – covariance matrix should be square
invalid_argument – covariance matrix must have size double the number of modes
invalid_argument – means vector should only have 1 row
invalid_argument – means vector must have size double the number of modes
-
inline Gaussian(floatmat cov, intvec m)¶
Constructor to initialize a Gaussian state with zero displacement on modes
m
- Parameters
cov –
vector<vector<double>>
representing the covariance matrixm –
vector<int>
containing the list of modes the gate acts on
- Throws
invalid_argument – covariance matrix should be square
invalid_argument – covariance matrix must have size double the number of modes