# Class Gaussian¶

## 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
• covvector<vector<double>> representing the covariance matrix

• means – single row vector<vector<double>> array representing the vector of means

• mvector<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
• covvector<vector<double>> representing the covariance matrix

• mvector<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