Class Thermal

Inheritance Relationships

Base Type

Class Documentation

class Thermal : public blackbird::Operation

Represents the thermal state. For more details, see the Strawberry Fields convention page.

Mean photon number parameter \(\bar{n}\) is accessible via:

  • \(\bar{n}\): Thermal->f1

Public Functions

Thermal(floatvec nbar, intvec m)

Constructor to automatically initialize a thermal state acting on mode m

Parameters
  • nbar: vector<double> of length 1 containing mean photon number
  • m: mode state is initialized on
Exceptions
  • std::invalid_argument: cannot have negative thermal population (nbar must be >= 0)

Thermal(complexvec nbar, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • nbar: vector<complex> parameters
  • m: mode state is initialized on
Exceptions
  • invalid_argument: Operation must have real arguments

Thermal(intvec nbar, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • nbar: vector<int> parameters
  • m: mode state is initialized on
Exceptions
  • invalid_argument: Operation must have real arguments