Math of Two-Qubit Circuits

Math of Two-Qubit Circuits

As in the previous article, single qubit circuits may be simple to use and manipulate, but many interesting quantum protocols and algorithms use multi-qubit circuits, including Grover’s Search and Shor’s Algorithm.

To understand how to represent multi-qubit circuits’ states, here’s a refresher of single-qubit states, represented in their ket, vector, and Bloch sphere:

No alt text provided for this image

However, since it is not ideal to draw a Bloch sphere for every qubit, it is best to stick with the ket and vector representation for multi-qubit states and circuits.

No alt text provided for this image

Just like in the binary system, qubits use right indexing in the ket notation. This means that the first qubit is on the right and the last qubit is on the left.

Back to vectors, if you recall that the top number of a single qubit vector is the contribution to the 0 state and the bottom number is the contribution to the 1 state, two qubits are quite similar. For two qubits, four total contributions need to be taken into account because there are four possibilities of what the different states can be: 00, 01, 10, and 11. To know which contribution will be represented where in the vector, you start with the state with the smallest decimal value at the top and gradually increase going down. Since 00 converts to 0 in decimal, it goes at the top. 01 just converts to 1 in decimal, so it goes next. 10 converts to 2 in decimal, so it goes next. Lastly, 11 is placed at the bottom because it is 3 in decimal.

No alt text provided for this image

Predicting the Output of Two-Qubit Circuits

Figuring out the output of a two-qubit circuit only takes two steps. First, find the ket representation of the final state. Let’s use this circuit for example:

No alt text provided for this image

Each qubit starts in the 0 state, then the qubit 0 gets flipped by the X gate to the 1 state. In the end, the circuit is in the state 01. The second step is to find the vector representation of the state from the ket representation. Looking back to the contribution vector above helps to see that the vector will turn out as the following.

No alt text provided for this image

Now, instead of being an X gate, predict what the output ket and vector would be if it were an H gate. Since qubit 0 will be put into superposition and nothing will happen to qubit 1, the output state will be 0+, or 00 for half of measurements and 01 for half of measurements. This means that the vector will look like the following.

No alt text provided for this image

The Controlled-X Gate

Controlled gates are two-qubit circuits. The first qubit is the control and the second is the target. Depending on the state of the control qubit, the target qubit may or may not be changed. If the state of the control qubit is 0, nothing will happen to the target qubit, however, if the state of the control qubit is 1, then a gate will be applied to the target qubit. For the Controlled-X gate, or the CX gate, that gate will be the X gate. Let’s predict the output of this circuit based on this.

No alt text provided for this image

Each of the qubits first start out in the 0 state, but then qubit 0 flips to a 1 from the X gate. In a controlled gate, the control qubit is the small circle. In this circuit, the control is qubit 0 and the target is qubit 1. Since the control qubit is in the 1 state, the target qubit, qubit 1, has the X gate applied to it. As a result, qubit 1 changes to a 1 state. In the end, the state for this circuit is 11. This can also be represented in vector notation.

No alt text provided for this image


要查看或添加评论,请登录

Michael K.的更多文章

  • Two VQE Use Cases

    Two VQE Use Cases

    When talking about the usefulness of quantum computing today, the only solution is by using noisy devices. Due to this,…

  • Types of?Qubits

    Types of?Qubits

    Most people hear about superconducting qubits from IBM’s system, however, those are not the only type of qubits. Three…

    5 条评论
  • After Sending the Circuit?-?Quantum Computing

    After Sending the Circuit?-?Quantum Computing

    After sending a quantum circuit to its hardware, it goes through four steps: transpliation, gates as pulses, readout…

  • The Search Problem: Grover's Search

    The Search Problem: Grover's Search

    As the amount of data is always increasing in databases, it becomes even more essential to have a reliable way to…

  • The Hype of Quantum Algorithms

    The Hype of Quantum Algorithms

    Quantum algorithms, different from quantum protocols, are a specific procedure for solving computational problems…

  • How Superdense Coding Works

    How Superdense Coding Works

    To begin discussing superdense coding, it is important to understand its classical counterpart. Let’s say that Alice…

  • Measuring Multi-Qubit Circuits

    Measuring Multi-Qubit Circuits

    Multi-Qubit circuits are great, however, until they are measured, we will never know their true outcome. Looking back…

  • Multi-Qubit Circuits

    Multi-Qubit Circuits

    After learning about single-qubit gates and states, it will be much easier to learn about multi-qubit counterparts. One…

  • Two Applications of Quantum Computing

    Two Applications of Quantum Computing

    As researchers are discovering new applications for quantum computing, currently we know of several useful…

  • Eavesdropping Quantum Key Distribution

    Eavesdropping Quantum Key Distribution

    The goal of Quantum Key Distribution (QKD) is to ensure you are having secure and private communication with the…

社区洞察

其他会员也浏览了