Class BSgate

Inheritance Relationships

Base Type

Class Documentation

class blackbird::BSgate : public blackbird::Operation

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

Beamsplitter parameters \(\theta\) and \(\phi\) accessible via:

  • \(\theta\): BSgate->f1

  • \(\phi\): BSgate->f1

Public Functions

inline BSgate(complexvec theta_phi, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • theta_phivector<complex<double>> parameters

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

Throws

invalid_argumentOperation must have real arguments

inline BSgate(intvec theta_phi, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • theta_phivector<int> parameters

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

Throws

invalid_argumentOperation must have real arguments

inline BSgate(floatvec theta_phi, intvec m)

Constructor to initialize a BSgate acting on modes m

Parameters
  • theta_phivector<double> of length 2 containing the beamsplitter angle and phase

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