java code to implement  the quantum cnot logic for 3 qubit ( as booleans ) entanglement may be with extensions of xor.  use random numbers  to simulate the control bit feature meaning , decide, if operations are executed in order to match entanglement criteria