Quantum Computing Simulation  
010000101110011010100111101101101110100110111111000010101000100110101001101110101101100010100111100000111111010010100001101000101011111111100010101100111111100000101011011110011010101101111111

Grover's Algorithm

high-level simulation
// flip sign of state m
//
q.a[m] = -q.a[m];

// inversion about the average
//
Complex avg = 0; for( unsigned long i = 0; i < q.N; ++i) avg += q.a[i];

avg *= 2.0/q.N; for( unsigned long i = 0; i < q.N; ++i) q.a[i] = avg - q.a[i];

Grover.c