Hint: select any gate in the gates pallete to see here the documentation for that gate.
In order to work with the Circuit Editor use the gates pallete on the left to drag & drop gates in the circuit at the desired position defined by a target qubit and a desired step. Once a gate is placed in the circuit, it's position can be easily adjusted: drag and drop gestures work for both the target and the control qubits. For any gate, a single click on a gate pictogram over a target qubit opens a pop-up control which allows editing the gate settings, adding or removing controls and deleting the gate. The same pop-up dialog can be used to add values for parameters in parametric gates or to assign the index of the classic bit used as mesurement target by the measure gates.
One gate into many:
- if the 'Shift' key is pressed during performing a drag & drop gesture, the original gate is not removed and an identical copy of the gate is created at the drop location in the circuit. - if the 'Alt' key is pressed during drag & drop and the direction of movement is strictly horizontal or strictly vertical an array of identical gates (horizontal or vertical) is created between the intial drag qubit and the drop qubit. Any gate can be replicated using this method horizontally, only single qubit gates can be replicated vertically. - once a gate has been added to the circuit it can be replicated in a rectangular array. This permits generating an arbitrarily large family of gates with only a few mouse clicks. For more details on how this works please check out the help button on replicate gates pop-up dialog which can be launched by clicking the lower left icon in a gate popup dialog.
Switching between gates:
- you can switch the type of gate that is placed in a circuit via a dialog raised by pressing the 's' or 'S' key while clicking the image of the gate.
Deleting gates:
- a gate can be deleted from the gate pop-up dialog. - a gate can also be deleted by dragging the gate and dropping it outside the editor area. - a gate can also be deleted by pressing the 'd' or 'D' key while clicking the image of a gate in the circuit.
Working with controls:
- controls can be added from the controls editing dialog which can be launched from the modal gate pop-up dialog. - controls can also be added by dragging a control icon from the top left panel to any position in circuit. The editor will figure out which is the nearest gate in order to attach the control to. - clicking over a control qubit opens up a pop-up dialog where control settings can be adjusted or the control can be removed. - a control can also be deleted by pressing the 'd' or 'D' key while clicking the control image in the circuit. - the state of a control can be toggled can by pressing the 's' or 'S' key (think of this as switch), while clicking the control image in the circuit. - a control position can be adjusted by dragging the control image similar to how it's done for regular gate. - if the 'Shift' key is pressed during dragging a control qubit the original control is not removed and a copy of the control is placed at the drop location.
Copy & Paste:
Ctrl + Click gesture over a gate or an empty cell can be used to select that cell. The effect of a second Ctrl + Click gesture will be to select a rectangular portion of the circuit. Once one ore more gates have been selected the Ctrl + C, Ctrl + V, Ctrl + X, Esc and Delete keys work as you would expect for those gates which have target qubits inside the selected area.
Measure gates:
- since we use a simulator, it does not make sense to sample the final state vector but instead we show directly the simulation results as an array of probabilities corresponding each possible state. As such, when measure gates are added to a circuit their role is not to make a measurement at the end of simulation but to indicate the classic bit that qubit would be measured into if the circuit were to be run on real quantum computer. - you can set up any classic bit index to a measure gate as long as the bit index is not larger than the maximum qubit index. Measure gates must be always placed last for any given qubit. - if multiple qubits share the same classic bit than simulation results for that bit is given by addition modulo 2 of individual measurement results. - if measure gates are missing altogether the simulation results are identical with the situation where each qubit has attached as the last gate a measure gate in the Z basis whose classic bit is equal to the qubit index. - whenever a gate is dragged in a new position, the classic bit index is automatically set equal to the qubit index. This is still true even if the shift key is pressed during drag & drop which means that in this particular case the original gate is not copied identically as it is actually done for the other gates.
Changing number of steps/qubits:
- the ± button in the toolbar allows changing the number of qubits and steps in the circuit. - while increasing the number of steps and/or qubits may sometimes be a necessity, decreasing the number of steps/qubits does not make sense in general since the qubits/steps which are not used will be simply ignored. One exception to this recommendation is the situation where you want to make the circuit editor surface smaller in order to save the circuit as a svg image. - steps or qubits can be removed from a pop-up dialog which is opened by double clicking on an empty cell in the circuit.
Getting help for gates:
- in order to see in this dashboard help information regarding a particular gate, select the gate in left panel gates pallete and than press the help button on the toolbar.
Way of working:
- we provide a link towards the circuit editor on our platform frontpage in order for new vistors to be able to easily explore it's features. However, that view does not allow saving circuits in a database, it only permits saving circuits to files. We recommend that you follow the 'My Projects' link on our platform frontpage, create a new project and continue your work from there.
Representation of states:
- the Bloch sphere Z-bazis state vectors are conventionally named: |0⟩ and |1⟩. The Z-basis is usually refered to as the computational or standard basis. The other bases commonly used are the X-basis: |+⟩ = 1/√2(|0⟩ + |1⟩), |-⟩ = 1/√2(|0⟩ - |1⟩) and the Y-basis: |+i⟩ = 1/√2(|0⟩ + i|1⟩), |-i⟩ = 1/√2(|0⟩ - i|1⟩).
Ordering of bits and qubits: - when simulating a circuit, the gates in the circuit editor are applied from left to right, which is the generally accepted convention. Visually, the circuit editor has an implicit ordering of qubits from top to bottom, where the qubit with index zero is placed on top and the qubit with the highest index is placed at the bottom of the editor. You can press the tooltips button to verify this ordering. - a valid question to be asked is how should the state vector be represented for a quantum register that consists of a given set of qubits. The state can be represented as a tensor product of qubits where the topmost qubit in our editor is placed at the start of the tensor product as the left-most qubit while the last (bottom) qubit is placed in the right-most position. This ordering feels very natural, and perhaps this is the reason it is being used in most physics textbooks. We will refer to this ordering as Big-Endian ordering. However, using this convention puts the most significant bit (MSB) on the right of the tensor product, and the least significant bit (LSB) on the left (imagine for example that you want to perform some simple arithmetic using a quantum circuit by adding the top two qubits into the third qubit using some CNOT gates). This is a problem because when casting a binary representation of a state vector to a decimal number, the most significant bit (MSB) should be put on the left, and the least significant bit (LSB) on the right. In order to acomodate this scenario we provide a checkbox that allows reversing the order of qubit/bits in the output state to Little-Endian. Many commercial quantum computing platforms like Qiskit (IBM), Forest (Rigetti), QSharp (Microsoft) and perhaps others use the Little-Endian convention. If you choose to work in the Little-Endian mode, the 0th index qubit gate should be placed at the bottom the circuit in our editor, not at the top, like this is rutinely done in Qiskit for example. The QFT gate is adapted to work with both the Little-Endian and the Big-Endian convention.