Class S2gate

Inheritance Relationships

Base Type

Class Documentation

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

inline S2gate(complexvec r_phi, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • r_phivector<complex<double>> parameters

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

Throws

invalid_argumentOperation must have real arguments

inline S2gate(intvec r_phi, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • r_phivector<int> parameters

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

Throws

invalid_argumentOperation must have real arguments

inline S2gate(floatvec r_phi, intvec m)

Constructor to initialize a BSgate acting on modes m

Parameters
  • r_phivector<double> of length 2 containing the squeezing magnitude and phase

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