Creating a simple quantum circuit
Now we are ready to create a simple quantum circuit in Amazon Braket.
When creating a quantum circuit in Braket, it should be noted that the circuit expands as different qubits are identified. Figure 4.1 shows the quantum circuit we are creating:
Figure 4.1 – Visualizing a simple circuit in Amazon Braket
The circuit starts with a state of |0⟩ on each qubit. In this chapter, please do not worry about the | and the ⟩ brakets around the numbers. We will review this later in Chapter 6, Using Gate-Based Quantum Computers - Qubits and Quantum Circuits. We will only use two very simple quantum gates. For our purposes right now, the X gate will also refer to as a NOT gate. The X gate will change the |0⟩ state into a |1⟩ state and vice versa. Additionally, we will use the identity gate, I, which leaves the original |0⟩ value as is. If the |1⟩ state was preceded by the identity gate...