// two-qubit state and operations // #include #include "Q2.h" using namespace std; Q2::Q2() { a00 = 1; a01 = a10 = a11 = 0; } void Q2::print(const char msg[]) const { cout << msg << ":" << endl; cout << " 00 " << a00*a00 << " (" << a00 << ")" << endl; cout << " 01 " << a01*a01 << " (" << a01 << ")" << endl; cout << " 10 " << a10*a10 << " (" << a10 << ")" << endl; cout << " 11 " << a11*a11 << " (" << a11 << ")" << endl; }