Defined in File BlackbirdProgram.h
public blackbird::Operation(Class Operation)
class blackbird::Interferometer : public blackbird::Operation¶
Represents an interferometer For more details, see the Strawberry Fields convention page.
This operation stores a linear interferometer unitary as a unitary matrix, ready to be decomposed into beamsplitters and rotation gates.
Unitary matrix \(U\) accessible via:
inline Interferometer(complexmat unitary, intvec m)¶
Constructor to initialize an interferometer acting on modes
vector<vector<complex<double>>>representing the unitary matrix
vector<int>containing the list of modes the gate acts on
invalid_argument – unitary matrix should be square
invalid_argument – unitary matrix must have the same size as the number of modes