Class Rgate

Inheritance Relationships

Base Type

Class Documentation

class Rgate : public blackbird::Operation

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

Rotation gate parameter \(\phi\) accessible via:

  • \(\phi\): Rgate->f1

Public Functions

Rgate(complexvec phi, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • phi: vector<double> parameters
  • m: mode gate acts on
Exceptions
  • invalid_argument: gate must have real arguments

Rgate(intvec phi, intvec m)

Constructor that throws an error if integer parameters are provided.

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

Rgate(floatvec phi, intvec m)

Constructor to automatically initialize a rotation gate acting on mode m

Parameters
  • phi: vector<double> of length 1 containing phase
  • m: mode gate acts on