Quantum Computing  
010000101110011010100111101101101110100110111111000010101000100110101001101110101101100010100111100000111111010010100001101000101011111111100010101100111111100000101011011110011010101101111111

CNOT - entangled states


    q   a b -> a b⊕a          class TwoQubit:
    0   0 0    0 0              def cnot(self):
    1   0 1    0 1                  '''Controlled NOT operation'''
    2   1 0    1 1                  self.onezero, self.oneone = self.oneone, self.onezero
    3   1 1    1 0                  return self

    Using an array:             Using names for the complex amplitudes:

    q[0], q[1], q[2], q[3]      zerozero, zeroone, onezero, oneone

    swap q[2] and q[3]          Python Quantum Computing simulator, Juliana Peña, 2011.