3.1.4 The Quantum Composer
The Quantum Composer is our graphical user interface for programming a quantum processor. Those familiar with quantum computing may recognize the composer as a tool to construct quantum circuits using a library of well-defined gates and measurements. For those not familiar, we will explain a few of the key parts.
When you first click on the "Composer" tab above, you will be asked to determine whether you would like to run an ideal quantum processor or a real quantum processor. This refers to the topology of the system. In the ideal processor, gates can be placed anywhere, whereas in the real processor, the topology is set by the physical device that is currently running in our lab (note that this restricts the usability of some of the two-qubit gates).
Once you are in the "Composer" tab, you can start making your very own quantum circuits!
We call this depiction a quantum score because it resembles a musical score in several respects. Time progresses from left to right. Each line represents a qubit (as well as what happens to that qubit over time). Each qubit has a different frequency, like a different musical note. Quantum gates are represented by square boxes that play a frequency for different durations, amplitudes, and phases. These are called single-qubit gates. The gates made with vertical lines that connect two qubits together are known as CNOT gates; these two-qubit gates function like an exclusive OR gate in conventional digital logic. The qubit at the solid dot end of the CNOT gate controls the inversion of the state of the qubit at the ⊕ end of the gate (hence controlled NOT, or CNOT). Some gates, like the CNOT, have hardware constraints; the set of allowed connections is defined in the schematic of the device located below the Quantum Composer, along with recently calibrated device parameters.
The Quantum Composer's library (located below the qubit stave) contains four classes of gates, each denoted by its own color. Hitting the help button on the right bar gives a quick summary of all the different gates.
The first class of gates (yellow) represents an idle operation on the qubit for a time equal to the single-qubit gate duration.
The second class of gates (green) represents a group known as Pauli operators, which represent bit-flips (X, which is a classical NOT), phase-flips (Z), and a combined bit-flip and phase-flip (Y).
The third class (blue) represents Clifford gates, which consist of H , S , and S† gates for generating quantum superposition, along with the all-important CNOT two-qubit gate which is necessary for entanglement. Here H means Hadamard gate, and S means Standard gate.
The final class (orange) represents gates that are required for universal control.
A quantum algorithm (circuit) begins by preparing the qubits in well-defined states (here the ground state, |0⟩, which we've automatically done for you), then executing a series of one- and two-qubit gates in time, followed by a measurement of the qubits. Measurements are depicted with pink boxes. There are two options for measurement: a standard measurement which is a simple Z projection, or a Bloch measurement which is a Bloch sphere projection to indicate the final qubit state having been projected along the X , Y and Z axes. After measurement, the qubit state becomes classical (either |0⟩ or |1⟩ but never a quantum superposition); this is represented by the double line that appears after a measurement operation. All these elements will become clearer as you walk through this user guide.
To use the Composer, simply drag the gate boxes into the qubit stave to place them. Double-tap the boxes to delete, or drag them to the trash bin. For the CNOT gate, drag into the stave and place first to indicate the target qubit, and then click again on the control qubit. Note that once you place a measurement, you cannot follow it with subsequent gates, because the information at that point has become classical.
Load the quantum score and try out simulating it to see what it does, or start composing your own!
Random Score
Open in Composer