Class BSgate

Inheritance Relationships

Base Type

Class Documentation

class 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

BSgate(complexvec theta_phi, intvec m)

Constructor that throws an error if complex parameters are provided.

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

BSgate(intvec theta_phi, intvec m)

Constructor that throws an error if integer parameters are provided.

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

BSgate(floatvec theta_phi, intvec m)

Constructor to initialize a BSgate acting on modes m

Parameters
  • theta_phi: vector<double> of length 2 containing the beamsplitter angle and phase
  • m: vector<int> containing both modes the gate acts on