Re:Show HN: Quantum JavaScript
by qubots on Thursday April 30, 2020 @01:35PM
(#23033561)
Thanks for sharing, this is very cool! Is there a way to add a second CNOT gate in the circuit by just dragging and dropping the pieces?
[ Parent
| on HN ]
Certainly :) You can add as many CNOT gates as you’d like.
There are a few ways to do this in code, so you can pick the style that feels right for you / your particular case: https://quantumjavascript.app/#Quantum_JavaScript
But it’s also easy to make CNOTs in the visual editor. Here’s an animated GIF demonstrating it: https://quantumjavascript.app/tutorials.html#Create_controll...
And for further clarity, here’s a description of the relevant steps in that animated GIF: 1. Drag an Identity gate (the circle) onto your circuit board. 2. Drag a Pauli X gate (the X) onto the same moment (column) of your circuit board. 3. Select both (by tapping on them). 4. Tap on the "C" button to join them into a controlled gate.