Class Dgate

Inheritance Relationships

Base Type

Class Documentation

class 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

Dgate(floatvec displacement_phase, intvec m)

Constructor to initialize a displacement gate acting on mode m

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

Dgate(complexvec alpha, intvec m)

Constructor to initialize a displacement gate acting on mode m

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

Dgate(intvec x, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • x: vector<int> parameters
  • m: mode gate acts on
Exceptions
  • invalid_argument: Operation must have real arguments