Class Gaussian

Inheritance Relationships

Base Type

Class Documentation

class 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

Gaussian(floatmat cov, floatmat means, intvec m)

Constructor to initialize a Gaussian state on modes m

Parameters
  • cov: vector<vector<double>> representing the covariance matrix
  • means: single row vector<vector<double>> array representing the vector of means
  • m: vector<int> containing the list of modes the gate acts on
Exceptions
  • 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

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 matrix
  • m: vector<int> containing the list of modes the gate acts on
Exceptions
  • invalid_argument: covariance matrix should be square
  • invalid_argument: covariance matrix must have size double the number of modes