// quantum computing emulation: H timing // // R. Perry, June 2020 // #include #include // atoi() #include "qce.h" using namespace qce; // using namespace std; #define State state,double> // #define State state //--------------------------------------------------------------------- int main( int argc, char *argv[]) { unsigned int qn = 2; if( argc > 1) qn = atoi(argv[1]); if( qn < 2) error( "HCC: bad qn arg"); State q(qn); unsigned int seed = SRAND(); q.init( 1, 1); std::cout << "HCC: seed = " << seed << ", n = " << q.n << ", N = " << q.N << "\n"; if( qn < 5) std::cout << "q:" << q; for( unsigned int k = 0; k < q.n; ++k) q.H(k); if( qn < 5) std::cout << "Hq:" << q; for( unsigned int k = 0; k < q.n; ++k) q.H(k); if( qn < 5) std::cout << "HHq:" << q; return 0; }