Class Xgate

Inheritance Relationships

Base Type

Class Documentation

class 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

Xgate(complexvec x, intvec m)

Constructor that throws an error if complex parameters are provided.

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

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

Xgate(floatvec x, intvec m)

Constructor to initialize a Xgate acting on mode m

Parameters
  • x: vector<double> of length 1 containing the position displacement
  • m: mode gate acts on