Class Rgate

Inheritance Relationships

Base Type

Class Documentation

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

inline Rgate(complexvec phi, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • phivector<double> parameters

  • m – mode gate acts on

Throws

invalid_argument – gate must have real arguments

inline Rgate(intvec phi, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • phivector<int> parameters

  • m – mode gate acts on

Throws

invalid_argument – gate must have real arguments

inline Rgate(floatvec phi, intvec m)

Constructor to automatically initialize a rotation gate acting on mode m

Parameters
  • phivector<double> of length 1 containing phase

  • m – mode gate acts on