Class Xgate

Inheritance Relationships

Base Type

Class Documentation

class blackbird::Xgate : public blackbird::Operation

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

Position displacement gate parameter \(x\) accessible via:

  • \(x\): Xgate->f1

Public Functions

inline Xgate(complexvec x, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • xvector<complex<double>> parameters

  • m – mode gate acts on

Throws

invalid_argumentOperation must have real arguments

inline Xgate(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

inline Xgate(floatvec x, intvec m)

Constructor to initialize a Xgate acting on mode m

Parameters
  • xvector<double> of length 1 containing the position displacement

  • m – mode gate acts on