Class S2gate

Inheritance Relationships

Base Type

Class Documentation

class S2gate : public blackbird::Operation

Represents the two mode squeezing gate. For more details, see the Strawberry Fields convention page.

Squeezing parameter \(z\) accessible via:

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

Public Functions

S2gate(complexvec r_phi, intvec m)

Constructor that throws an error if complex parameters are provided.

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

S2gate(intvec r_phi, intvec m)

Constructor that throws an error if integer parameters are provided.

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

S2gate(floatvec r_phi, intvec m)

Constructor to initialize a BSgate acting on modes m

Parameters
  • r_phi: vector<double> of length 2 containing the squeezing magnitude and phase
  • m: vector<int> containing both modes the gate acts on