Efficient Long-Range Entanglement Using Dynamic Circuits
Excited to share the IBM Quantum blog featuring our recent PRX Quantum paper:
"Efficient Long-Range Entanglement using Dynamic Circuits." [Blog Link] [Paper Link (Open Access)]
đ Why does this matter?
Quantum processors are limited by local connectivity, but our research demonstrates how dynamic circuitsâleveraging mid-circuit measurements and feed-forward operationsâcan overcome these constraints. This direction opens new doors for efficiently creating long-range entanglement, a key resource for quantum computing.
đ What did we achieve?
Developed a method to perform CNOT teleportation across up to 101 qubits using only shallow circuits.
Prepared GHZ states with genuine long-range entanglement.
Demonstrated significant reductions in circuit depth, making computations more resilient to noise.
đĄ Why itâs exciting:
Dynamic circuits aren't just a new tool; theyâre an accelerant for scaling quantum computing. By combining quantum and classical operations, weâve taken a step closer to making modular quantum architectures and error correction a reality.
đ Grateful to the dream team behind this work:
Elisa BĂ€umer, PhD, Vinay Tripathi, Derek S. Wang, Patrick Rall, Edward H. Chen, Swarnadeep Majumder, Alireza Seif, and Zlatko Minev.
đ Read more in the IBM blog: [Blog Link]
đ PRX Quantum paper: [Paper Link (Open Access)] [arXiv
Letâs discuss! đ
Except from the IBM Quantum Blog
In this article, weâll explain how the IBM researchers uses dynamic circuits to create long-range entangling gates, and to prepare long-range entangled states in locally connected qubits. Along the way, weâll also explore the immense implications these new capabilities could have for the future of quantum computation.
The power of dynamic circuits
Quantum computers have the potential to solve some computational problems more efficiently than any classical computing method. However, for many computing tasks, classical computation remains faster and more reliable. In fact, quantum computers rely on classical computation for both preparing quantum circuits and analyzing the results of circuit executions, and increasingly, quantum researchers are developing algorithms that exploit both quantum and classical methods in the middle of those circuit executions as well.
Algorithms powered by dynamic circuits are a promising and extremely versatile example of how quantum and classical methods can work together within a quantum circuit. Dynamic circuits use mid-circuit measurements to implement feed-forward operationsâi.e., classical calculations based on the results of measurements performed on qubits in the circuit. These classical calculations determine subsequent gate applications as the circuit execution continues.
A simple example of this is the reset operation that resets a qubit to the |0â© state. You might implement this by programming a dynamic circuit to measure a certain qubit and either apply an X gate if the measurement outcome is 1, or do nothing if the measurement outcome is 0.
What does the X gate do? Applying an X gate to a qubit in state |1â© will change the qubit to state |0â©. This is also known as a âbit flip,â because it âflipsâ the qubit state.
The image to the left is taken from episode 153 of the Qiskit Seminar Series on the Qiskit YouTube channel, which features lead author Elisa BĂ€umer discussing the PRX Quantum paper. The image depicts the scheme of a reset operation in a dynamic circuit, where the application of the X gate is conditioned upon the result of the mid-circuit measurement.
The IBM researchers behind the PRX Quantum paper use dynamic circuits to generate long-range entanglement between qubits using shallow-depth quantum circuits. The methods they demonstrate in their paper serves to overcome the limited connectivity between qubits in superconducting quantum chips while also making the qubits more resilient against environmental noise.
A new approach to long-range CNOT gates
One of the fundamental properties of quantum computers that gives them advantage over classical computers is their ability to create quantum entanglement between qubits. Quantum entanglement is achieved when the state of one entangled qubit influences the state of the other.
The controlled-not (CNOT) gate is one of the most common two-qubit quantum gates we use to generate entanglement between qubits. A CNOT gate always involves two qubitsâa control qubit and a target qubit. If the control qubit is in the |1â© state, the CNOT gate flips the target qubit. If the control qubit is in any other state, nothing happens. We represent this in Bra-ket notation as CNOT(A|00â© + B|10â©) = A|00â© + B|11â©).
Todayâs superconducting quantum chips have limited connectivity between qubits. For example, IBM Quantum chips are all limited to nearest-neighbor connectivity, meaning they are only connected to qubits immediately adjacent to them. However, quantum computing applications like quantum error correction and quantum simulation often require entanglement between distant qubits. The quantum community has developed methods for implementing these long-range CNOT gates
Current quantum chips have limited qubit connectivity, so you canât directly apply a CNOT gate between every pair of qubits. If you want to implement a CNOT gate between 2 qubits that are not connected to each other, you can use swap gates. As the name suggests, you can use swap gates to âswapâ the position of qubits. For instance, you can use swap gates to implement a CNOT gate between two qubits, one in position A and the other in position C. They are not directly connected but share a connection with a third qubit in position B. First, you can use a swap gate between the qubit in position A and the qubit in B, then perform the CNOT operation between the qubit in B and the qubit in C, and finally apply another swap gate between the qubit in position A and the one in B to restore the original configuration. One problem with using swap gates is that they are implemented using 3 CNOT gates. CNOT are one of the main sources of noise and complexity in a quantum circuit, so we try to minimize how many of them we use.
, but implementing these methods in practice can be a hard challenge with the current technology.
The figure below illustrates how we would implement a long-range CNOT gate using both a traditional unitary circuit and a dynamic circuit incorporating classical logic.
To create a long-range CNOT gate using a normal unitary circuit on a chip with only nearest-neighbor connectivity, we must apply a linear number of CNOT gatesâone for each of the qubit pairs situated between the main control and target qubits of the long-range CNOT pairing. This allows us to essentially send the entanglement across the chip like a game of âtelephone,â where friends stand in a line and whisper a secret message from one person to the next.
Of course, in the game of telephone, the message sent by the first person in the line is almost never the same as the message received by the last person. Errors are introduced as the participants whisper the message from one person to the next, and the same is true for long-range CNOT gates. The circuit is often affected by noise introduced through the imperfect implementation of CNOT gates between neighboring qubits in the hardware. The chances of the circuit being negatively impacted by noise only increase as we add more qubits between the control and target of our long-range CNOT (i.e., as we increase the depth of the circuit).
How to build the long-range CNOT with dynamic circuits
Using the method described above, we need 4N+1 CNOT gates to implement our long-range CNOT, where N represents the number of ancilla qubits between the long-range CNOTâs control and target. Thatâs a lot of CNOT gates, especially given that every two-qubit gate added to a quantum circuit significantly increases the circuitâs overall complexity.
To overcome this problem, the authors of the research paper propose an equivalent method that uses dynamic circuit capabilities to implement long-range CNOT gates with comparatively shallow circuits. Their method requires only N+1 CNOTsâa significant reduction in complexity. Hereâs what a long-range CNOT gate looks like using dynamic circuits:
Fig.4 of the paper. Scheme of the procedure to obtain the long-range CNOT with a dynamic circuit.
Letâs take a moment to break down whatâs happening in this image.
Regardless of whether youâre building your long-range CNOT gate with a dynamic circuit or a traditional unitary circuit, you will first need to entangle the long-range gates target and control qubits with all the qubits situated between them. Then, you must disentangle all the qubits in the middle, leaving entanglement only between the first and last qubitsâi.e., the control and target of the long-range gate. At the end of the circuit, we use the measurement results of the ancilla qubits between the long-range gateâs control and target qubits, and flip the qubits depending on the outcome to ensure that we have created a long-range CNOT gate as intended.
In the previous section, we saw how this works in a normal unitary circuit. Now, letâs take a look at how it would work with a dynamic circuit. Weâll do so using a small 5-qubit example, where our goal is to implement a CNOT gate between the first and last qubit. In this case, the final quantum state that we want to obtain between first and last qubit is a bell state |psiâ©=1/sqrt(2)(|00â© + |11â©).
Diagram of a 5 qubit dynamic circuit implementation of a long-range CNOT between the first and last qubits. Image credit: Simone Cantori.
We start by implementing a standard Bell state for the first qubit pair and a GHZ state for the last 3 qubits.
What are the Bell and GHZ states? Bell state and GHZ are entangled quantum states. Their mathematical representations in this case are |Bellâ©=1/sqrt(2)(|00â© + |11â©) and |GHZâ©=1/sqrt(2)(|000â© + |111â©).
Then, weâll need to entangle these two quantum states using another CNOT implemented between the second and third qubit. Since our final goal is to obtain a Bell state for the first and the last qubit, we have to disentangle and reset the ancilla qubits in the middle of the circuit.
The third qubit is entangled with and stores the parity of the others. This means that, after we measure it, we must ensure that the first and last qubit are both in a superposition of |00â© and |11â©. To achieve this result, we implement a feed-forward X gate to the last qubit according to the measurement outcome.
From there, we apply Hadamard gates to the second and fourth qubits right before taking the mid-circuit measurement. However, this operation will change the phase of some elements in your quantum state from positive (+) to negative (-). We can retrieve the correct phase by applying a feed-forward Z gate on the first qubit immediately after the mid-circuit measurement. You can see a more formal representation of this procedure in the image below:
Binary tree to represent the quantum state after each step of the 5-qubits example. The final possible quantum states are the ones before the feed-forward Z gate. In fact, you can see that the _|00â©_ elements have a different sign than the _|11â©_ ones only when one of the two measurements is 1, so when the feed forward Z will be applied. Image credit: Simone Cantori.
You can also see the intermediate steps for implementing a long-range CNOT gate with dynamic circuits in the animation seen here. (Video credit: Simone Cantori.)
Itâs worth noting that we could also obtain the same result using classical post-processing methods. In this case, rather than applying quantum gates determined by the results of the mid-circuit measurement (e.g. the final X and Z gates at the end of the dynamic circuit protocol), we would just end the circuit run at the measurement step and apply classical operations from there. With this post-processing approach, the results are not influenced by errors from the classical feed forward operations that take place in a dynamic circuit. However, this only works if the long-range CNOT is meant to be at the end of your circuit. If the long-range CNOT gate youâve created is part of a larger algorithm that requires the application of additional gates after the CNOT, the post-processing method wonât work, since the rest of the computation depends on the quantum state we create after the implementation of the CNOT.
The dynamic circuit implementation of the long-range CNOT requires 3N fewer CNOT gates than the unitary circuit version. However, it also requires N mid-circuit measurements. Given that these measurements are less prone to noise than 3N CNOT gates, dynamic circuits appear to be a much more reliable alternative to the standard unitary circuit approach.
The IBM researchers demonstrate this advantage using the current fleet of IBM Quantum computers by calculating the fidelity of the implemented quantum gate.
Fig.1c of the paper. Gate fidelity as a function of the number of qubits. The unitary circuit converges to the random gate fidelity (0.25) much faster than the dynamic circuit implementation.
Pushing long-range entanglement even further
In their paper, the IBM researchers show that we can use dynamic circuits to do much more than create individual long-range two-qubit gates. For instance, we can also use them to prepare entire quantum states with multiple long-range entanglements. As an example of this, letâs look at the protocol for implementing GHZ states using dynamic circuits, which we see depicted in the figure below:
Fig.2b of the paper. Left side shows the unitary circuit implementation of a GHZ state. Right side shows the an equivalent scheme for implementing the same GHZ state using a dynamic circuit.
GHZ states are entangled quantum states involving three or more qubits. Their general representation is |GHZâ©=1/sqrt(2)(|00âŠ0â© + |11âŠ1â©). One can see this as a generalization of the 1/sqrt(2)(|00â© + |11â© Bell state for more than two (i.e. âmanyâ) qubits.
The unitary circuit version of this GHZ state implementation requires n-1 total CNOT gates, and the number of two-qubit gate layers scales linearly with the number of qubits.
What is a two-qubit gate layer? A two-qubit gate layer is a set of two-qubit gates acting on different qubits at the same time. The number of two-qubit gate layers is also called two-qubit gate depth.
The method for preparing a GHZ state with a dynamic circuit is similar to the method we for creating a long-range CNOT gate. First, you entangle pairs of qubits implementing Bell states. Then, you connect these pairs with an additional layer of CNOT gates, and you measure the target qubits of these CNOT gates.
Similar to the long-range CNOT gate, you can use feed-forward X gates after the measurements to avoid unwanted bitflips, and to make sure all entangled qubits are perfectly correlated. After that, you reset the measured qubits and apply a final layer of CNOT gates to obtain the GHZ state.
The depth of the dynamic circuit remains constant, but it is implemented using 3n/2 â 1 total CNOT gates, and n/2 â 1 mid-circuit measurements. Although the dynamic circuit requires more CNOT gates and mid-circuit measurements, both of which are affected by noise, there still exists a regime in which implementing the dynamic circuit is more convenient than implementing the standard one. This is due to the idle time error
What is idle time error? In a two-qubit gate layer, it can happen that not all qubits are involved in the quantum gates. When this happens, the unused qubits are exposed to errors coming from interaction with the environment.
.
In fact, because the number of two-qubit gate layers scales linearly with the number of qubits, you get a quadratic scaling of the idle time error (approximately n qubits * n layers). This means that for large n, the impact of idle time error could be more significant than the impact of the CNOT gates and mid-circuit measurements. The threshold for defining the regime where the dynamic circuit is better than the unitary circuit also depends on the intensity of the noise acting on the different operations.
This graph shows the occurrence of two different sources of error for increasing number of qubits. The circles demonstrate how the number of CNOT gates increases as the number of qubits in the system grows, while the triangles represent the increasing idle time error. For dynamic circuits, we can see that both sources of error scale linearly. For unitary circuits, the number of CNOT gates scales linearly as well and is even below the number observed in dynamic circuits. However, errors caused by idle time increase quadratically, meaning that the total error of the unitary circuit quickly surpasses that of dynamic circuits.
In their experiments, the IBM researchers demonstrated how the use of dynamic circuits can enable higher fidelities on up to 101 qubits of a large-scale superconducting quantum processor. Their experiments show that dynamic circuits offer a promising solution for overcoming the connectivity limitations of large-scale noisy quantum hardware. For more on this research, be sure to read the full paper in PRX Quantum, and head to IBM Quantum Platform to start experimenting with quantum computers today.