Class Catstate

Inheritance Relationships

Base Type

Class Documentation

class blackbird::Catstate : public blackbird::Operation

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

Cat state parameters \(\alpha\) and \(p\) (parity) is accessible via:

  • \(|\alpha|\): Catstate->f1

  • \(\text{arg}(\alpha)\): Catstate->f2

  • \(p\): Catstate->f3

Public Functions

inline Catstate(complexvec alpha, intvec m, float parity = 0.)

Constructor to automatically initialize a cat state acting on mode m

Parameters
  • alphavector<complex> of length 2 containing displacement

  • m – mode state is initialized on

  • parityfloat parity of the cat state

inline Catstate(floatvec alpha, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • alphavector<double> parameters

  • m – mode state is initialized on

Throws

invalid_argument – alpha parameter must be complex

inline Catstate(intvec alpha, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • alphavector<int> parameters

  • m – mode state is initialized on

Throws

invalid_argument – alpha parameter must be complex