Class Fock

Inheritance Relationships

Base Type

Class Documentation

class blackbird::Fock : public blackbird::Operation

Represents a Fock state. For more details, see the Strawberry Fields convention page.

Photon number \(n\) is accessible via:

  • \(n\): Fock->i1

Public Functions

inline Fock(intvec n, intvec m)

Constructor to automatically initialize a Fock state acting on mode m

Parameters
  • nvector<double> of length 1 containing photon number

  • m – mode state is initialized on

Throws

std::invalid_argument – cannot have negative Fock state (n < 0)

inline Fock(floatvec n, intvec m)

Constructor that throws an error if real parameters are provided.

Parameters
  • nvector<double> parameters

  • m – mode state is initialized on

Throws

invalid_argumentOperation must have integer arguments

inline Fock(complexvec n, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • nvector<complex> parameters

  • m – mode state is initialized on

Throws

invalid_argumentOperation must have integer arguments