class Controlled

Base for multi-bit (multi-controlled one bit) gates.

Concepts/Code by: Rafal Podeszwa, Christopher Dawson, Peter Belkner, Yan Pritzker
Members

Public
virtual void operator() (QState &q, int mask, int bit) : Operator for application of gate to a QState.
virtual void operator() (QState &q, int bits[], int bit) : This version allows bitmask to be specified in an array of int.
void SetMatrix (const Complex &a00, const Complex &a01, const Complex &a10, const Complex &a11) : Allows reusal of a defined gate by changing its matrix.

Protected
Controlled (const Complex &a00=1, const Complex &a01=0, const Complex &a10=0, const Complex &a11=1) : Constructor to create gate matrix (Identity Matrix by default)




Return To Index