Class Coherent

Inheritance Relationships

Base Type

Class Documentation

class Coherent : public blackbird::Operation

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

Displacement parameter \(\alpha\) is accessible via:

  • \(|\alpha|\): Coherent->f1
  • \(\text{arg}(\alpha)\): Coherent->f2

Public Functions

Coherent(floatvec displacement_phase, intvec m)

Constructor for the coherent class to automatically initialize a coherent state acting on mode m

Parameters
  • displacement_phase: vector<double> of length 2 containing the displacement magnitude and phase
  • m: mode state is initialized on

Coherent(complexvec alpha, intvec m)

Constructor for the coherent class to automatically initialize a coherent state acting on mode m

Parameters
  • alpha: vector<complex<double>> of length 1 containing the displacement as a complex value
  • m: mode state is initialized on

Coherent(intvec alpha, intvec m)

Constructor for the coherent class that throws an error if integer parameters are provided.

Parameters
  • alpha: vector<int> parmeters
  • m: mode state is initialized on
Exceptions
  • invalid_argument: Coherent must have real arguments