The current project it is a bettering of the "Entangled Qubit Simulator with Arduino" project. We had added a joystick and improved part of the code.
With the joystick you can change the percentage of a qubit of being a |1>, and therefore, of being a |0>. The Y axes represent the qubit A, and the X axes acts as the variation of qubit B. It uses the map function:
aPercentOne = map(Y, 0, 1023, 0, 100);
bPercentOne = map(X, 0, 1023, 0, 100);
With the entagled/not entangled switch, you can make that the qubits be correlated or not. If they are entangled, the collapse of one determines the collapse of the order. It uses an interruption function:
attachInterrupt(digitalPinToInterrupt(BUTTON_ENTANGLEMENT), changeEntangled, RISING);
With the stop/resume button you can control the firmware of the microcontroller and switch of the LEDs. It uses another interruption function:
attachInterrupt(digitalPinToInterrupt(BUTTON), changeState, RISING);
LEDs help to visuallize the estate of the qubits once collapsed. The third LED on the left it is not necessary with the present firmaware. To use the joystick turn it with the its pins and jumpers to bellow (on the contrary to the image)
Serial Monitor helps to visualize the state of qubit A and qubit B. After both, are the two qubits BA collapsed together. They change as a result of the interaction with the joystick:
For entangled qubits we use the following formula, common for both:
entangled ? (bQubit = aQubit = (aCollapse ? collapse(aPercentOne) : collapse(bPercentOne))) : doNothing;
When qubits are not entangled we use the following formulae:
!entangled ? (aQubit = collapse(aPercentOne)) : doNothing;
!entangled ? (bQubit = collapse(bPercentOne)) : doNothing;
ConclusionsThe joystick acts as a kind of Bloch sphere, but in two dimensions and for both qubits at the same time.
Possible BetteringsTo use a joystick that wireless joystick that communicates with the Arduino Uno microcontroller by bluetooth low energy, for example.
Comments
Please log in or sign up to comment.