// quantum computing emulation routines // // Bernstein & Vazirani problem: determine the hidden coefficient of a Boolean function // // A the hidden coefficient (for debugging) // fx the classical Boolean function // fq the quantum Boolean function // H perform Hadamard transformation on all qubits // unsigned long A( unsigned long N); unsigned int fx( unsigned long x, unsigned long N); // 0 <= x <= N-1 void fq( double _Complex q[], unsigned long M); // q[0]...q[M-1] void H( double _Complex q[], unsigned long M);