Class Sgate

Inheritance Relationships

Base Type

Class Documentation

class Sgate : public blackbird::Operation

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

Squeezing parameter \(z\) is accessible via:

  • \(r=|z|\): Sgate->f1
  • \(\phi=\text{arg}(z)\): Sgate->f2

Public Functions

Sgate(floatvec r_phase, intvec m)

Constructor to initialize a Sgate acting on mode m

Parameters
  • r_phase: vector<double> of length 2 containing the squeezing magnitude and phase
  • m: mode gate acts on

Sgate(complexvec alpha, intvec m)

Constructor that throws an error if complex parameters are provided.

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

Sgate(intvec alpha, intvec m)

Constructor that throws an error if integer parameters are provided.

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