Class Pgate

Inheritance Relationships

Base Type

Class Documentation

class blackbird::Pgate : public blackbird::Operation

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

Phase shift parameter \(s\) accessible via:

  • \(s\): Pgate->f1

Public Functions

inline Pgate(complexvec s, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • svector<complex<double>> parameters

  • m – mode gate acts on

Throws

invalid_argumentOperation must have real arguments

inline Pgate(intvec s, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • svector<int> parameters

  • m – mode gate acts on

Throws

invalid_argumentOperation must have real arguments

inline Pgate(floatvec s, intvec m)

Constructor to initialize a Pgate acting on mode m

Parameters
  • svector<double> of length 1 containing the phase shift

  • m – mode gate acts on