#include <qggates.h>
Inheritance diagram for qgame::QOracle:
Public Member Functions | |
QOracle (const std::string &truthtable) | |
Construct a quantum oracle implementing the truth table given as a string of 0 and 1, specifying the outputs. | |
std::string | dump () const |
Return a string describing the gate. | |
virtual unsigned int | numQb () |
Number of qubits manipulated, NOT amplitudes. | |
virtual void | apply (QuSubReg &) throw (Error) |
Apply gate to given qubits. | |
Protected Attributes | |
int | numQubits |
Number of affected Qubits. | |
int | numAmps |
Number of amplitudes, generally 2^numQubits. | |
std::vector< std::vector< Complex > > | matrix |
Unitary matrix [numAmps x numAmps] defining the gate. |
<qn> <out>: Applies a quantum oracle to the specified qubits.
Definition at line 156 of file qggates.h.