Class Catstate

Inheritance Relationships

Base Type

Class Documentation

class 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

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

Constructor to automatically initialize a cat state acting on mode m

Parameters
  • alpha: vector<complex> of length 2 containing displacement
  • m: mode state is initialized on
  • parity: float parity of the cat state

Catstate(floatvec alpha, intvec m)

Constructor that throws an error if complex parameters are provided.

Parameters
  • alpha: vector<double> parameters
  • m: mode state is initialized on
Exceptions
  • invalid_argument: alpha parameter must be complex

Catstate(intvec alpha, intvec m)

Constructor that throws an error if integer parameters are provided.

Parameters
  • alpha: vector<int> parameters
  • m: mode state is initialized on
Exceptions
  • invalid_argument: alpha parameter must be complex