Class Thermal

Inheritance Relationships

Base Type

Class Documentation

class blackbird::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

inline Thermal(floatvec nbar, intvec m)

Constructor to automatically initialize a thermal state acting on mode m

Parameters
  • nbarvector<double> of length 1 containing mean photon number

  • m – mode state is initialized on

Throws

std::invalid_argument – cannot have negative thermal population (nbar must be >= 0)

inline Thermal(complexvec nbar, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • nbarvector<complex> parameters

  • m – mode state is initialized on

Throws

invalid_argumentOperation must have real arguments

inline Thermal(intvec nbar, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • nbarvector<int> parameters

  • m – mode state is initialized on

Throws

invalid_argumentOperation must have real arguments