Class CXgate

Inheritance Relationships

Base Type

Class Documentation

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

inline CXgate(complexvec s, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • svector<complex<double>> parameters

  • mvector<int> containing both modes the gate acts on

Throws

invalid_argumentOperation must have real arguments

inline CXgate(intvec s, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • svector<int> parameters

  • mvector<int> containing both modes the gate acts on

Throws

invalid_argumentOperation must have real arguments

inline CXgate(floatvec s, intvec m)

Constructor to initialize a CXgate acting on modes m

Parameters
  • svector<double> of length 1 containing the parameter

  • mvector<int> containing both modes the gate acts on