Quantum Computing Simulation  
010000101110011010100111101101101110100110111111000010101000100110101001101110101101100010100111100000111111010010100001101000101011111111100010101100111111100000101011011110011010101101111111

Simulating One Classical Bit

void X( int b[]) { b[0] = !b[0]; } // NOT

int main( void) { int b[1] = { 0 }; // constraint: b[i] = 0 or 1
...
Simulating Two (or more) Classical Bits

void X( int b[], int k) { b[k] = !b[k]; } // NOT on bit k

void CX( int b[], int c, int k) // controlled-NOT on bit k controlled by bit c, c != k
{
   b[k] ^= b[c]; // if( b[c]) b[k] = !b[k];
}

int main( void) { int b[2] = { 0, 0 };
...