Class Zgate

Inheritance Relationships

Base Type

Class Documentation

class Zgate : public blackbird::Operation

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

Momentum displacement gate parameter \(z\) accessible via:

  • \(z\): Zgate->f1

Public Functions

Zgate(complexvec z, intvec m)

Constructor that throws an error if complex parameters are provided.

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

Zgate(intvec z, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • z: vector<int> parameters
  • m: mode gate acts on
Exceptions
  • invalid_argument: Operation must have real arguments

Zgate(floatvec z, intvec m)

Constructor to initialize a Zgate acting on mode m

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