Class Dgate

Inheritance Relationships

Base Type

Class Documentation

class blackbird::Dgate : public blackbird::Operation

Represents the displacement gate. For more details, see the Strawberry Fields convention page.

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

  • \(|\alpha|\): Dgate->f1

  • \(\text{arg}(\alpha)\): Dgate->f2

Public Functions

inline Dgate(floatvec displacement_phase, intvec m)

Constructor to initialize a displacement gate acting on mode m

Parameters
  • displacement_phasevector<double> of length 2 containing the displacement magnitude and phase

  • m – mode gate acts on

inline Dgate(complexvec alpha, intvec m)

Constructor to initialize a displacement gate acting on mode m

Parameters
  • alphavector<complex<double>> of length 1 containing the displacement as a complex value

  • m – mode gate acts on

inline Dgate(intvec x, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • xvector<int> parameters

  • m – mode gate acts on

Throws

invalid_argumentOperation must have real arguments