Class CXgate

Inheritance Relationships

Base Type

Class Documentation

class CXgate : public blackbird::Operation

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

CX parameter \(s\) accessible via:

  • \(s\): CXgate->f1

Public Functions

CXgate(complexvec s, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • s: vector<complex<double>> parameters
  • m: vector<int> containing both modes the gate acts on
Exceptions
  • invalid_argument: Operation must have real arguments

CXgate(intvec s, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • s: vector<int> parameters
  • m: vector<int> containing both modes the gate acts on
Exceptions
  • invalid_argument: Operation must have real arguments

CXgate(floatvec s, intvec m)

Constructor to initialize a CXgate acting on modes m

Parameters
  • s: vector<double> of length 1 containing the parameter
  • m: vector<int> containing both modes the gate acts on