Distributed CNOT

Performs a CNOT operation distributed over two nodes: Controller and Target. Controller owns the control qubit and Target the target qubit.
Runs
4
Created
November 17, 2021
Updated
December 13, 2022

Description

An overview of the distributed CNOT.

A quantum network makes it possible to connect spatially separated quantum processors to perform computations that make use of the quantum resources available at each node. The quantum processors (computers) connected across the network can be small -- consisting of only a few qubits -- or on the opposite side of the spectrum, they could be large scale fully fault-tolerant quantum computers, which scientists hope to develop in the future.

An essential tool for distributed quantum computing is a distributed two-qubit entangling gate that works between two nodes of a network. A quantum computation or operation is called distributed if it has to be conducted with the cooperation of two or more nodes connected by network links. The CNOT operation, which changes the state of the second qubit -- called the target qubit, according to the state of the first qubit -- called the control qubit, is the primary example of this type of gate, as it appears as an essential operation in most quantum computations. See the Blind Computation application in the Editor and its information page for an interesting application of distributed quantum computing! 

To better understand the distributed CNOT it is a reasonable first step to build an understanding of the CNOT operation. The below table displays the target and control qubit states output by the CNOT operation, for various different input states. The first thing to know is that the state of a qubit can generally be written as ψ=cosθ20+eiϕsinθ21\vert\psi\rangle = \cos\frac{\theta}{2} \vert0\rangle + e^{i \phi} \sin\frac{\theta}{2} \vert1\rangle, where θ\theta and ϕ\phi are the angles on the Bloch sphere that you can specify in the editor. Since the CNOT operation is conditioned upon the state of the control qubit, the simplest cases occur when the control qubit is in the state 0\vert0\rangle or 1\vert1\rangle. In the case that the control state is 0\vert0\rangle, nothing happens. If the control qubit state is 1\vert1\rangle, then the 0\vert0\rangle of the target qubit state ψ\vert\psi\rangle flips to become 1\vert1\rangle, and concurrently the 1\vert1\rangle part flips to become 0\vert0\rangle. See the first four rows of the table for illustration. If instead, the control state is a more general state ψ\vert\psi\rangle, then the CNOT can actually cause the control and target qubits to become entangled. See rows five to seven of the table for examples.

Input: control qubit Input: target qubit Output: State of control (left) and target (right) qubit
0\vert0\rangle any state\text {any state} Same as input states\text{Same as input states}
1\vert1\rangle 0\vert0\rangle 11\vert1\rangle\vert1\rangle
1\vert1\rangle 1\vert1\rangle 11\vert1\rangle\vert1\rangle
1\vert1\rangle ψ=cosx2 0+eiysinx2 1\vert\psi\rangle = \cos\frac{x}{2}~\vert0\rangle+e^{i y}\sin\frac{x}{2}~\vert1\rangle 1(cosx2 1+eiysinx2 0)\vert1\rangle\left( \cos\frac{x}{2}~\vert1\rangle + e^{i y}\sin\frac{x}{2}~\vert0\rangle \right)
+\vert+\rangle 0\vert0\rangle An EPR pair: 12(00+11)\text{An EPR pair: } \\\frac{1}{\sqrt{2}} \big( \vert0\rangle \vert0\rangle + \vert1\rangle \vert1\rangle \big)
+\vert+\rangle 1\vert1\rangle A different EPR pair: 12(01+10)\text{A different EPR pair: } \\\frac{1}{\sqrt{2}} \big( \vert0\rangle \vert1\rangle + \vert1\rangle \vert0\rangle \big)
\vert-\rangle i\vert i\rangle An entangled state:12(0ii1i)\text{An entangled state:}\\\frac{1}{\sqrt{2}} \big( \vert0\rangle \vert i\rangle -i \vert1\rangle \vert {-i}\rangle \big)

For any state not covered in the table then it is straightforward to calculate the effect of the CNOT. A general description of the control and target states together is:

ψ1ψ2=(cosθ120+ eiϕ1sinθ121)(cosθ220+ eiϕ2sinθ221)=cosθ12cosθ2200+eiϕ2cosθ12 sinθ2201+eiϕ1sinθ12cosθ2210+eiϕ1eiϕ2sinθ12sinθ2211\vert\psi_1\rangle\vert\psi_2\rangle = \left(\cos \frac{\theta_1}{2} \vert\mathit{0}\rangle \hspace{2mm}+\hspace{2mm}  e^{i \phi_1} \sin \frac{\theta_1}{2} \vert1\rangle\right) \left(\cos \frac{\theta_2}{2} \vert0\rangle \hspace{2mm}+\hspace{2mm}  e^{i \phi_2} \sin \frac{\theta_2}{2} \vert1\rangle\right) = \newline \, \newline \cos \frac{\theta_1}{2} \cos \frac{\theta_2}{2} \vert0\rangle \vert0\rangle + e^{i \phi_2} \cos \frac{\theta_1}{2}  \sin \frac{\theta_2}{2} \vert0\rangle \vert1\rangle + e^{i \phi_1} \sin \frac{\theta_1}{2} \cos \frac{\theta_2}{2} \vert1\rangle \vert0\rangle + e^{i \phi_1} e^{i \phi_2} \sin \frac{\theta_1}{2} \sin \frac{\theta_2}{2} \vert1\rangle \vert1\rangle

The full effect of the CNOT operation on such a pair of states is determined by applying a CNOT individually to each term of the right hand side of the equation.

In the distributed CNOT application that can be run in the Editor, you will see that the first step is to establish entanglement between a qubit held by the control node and a qubit held by the target node. We refer to these qubits that make up the entangled pair at each node as the communication qubits. This entangled link is used to facilitate the distributed CNOT operation, and is consumed by the procedure. 

Next you will see the control and target states being prepared according to the input’s you selected. In the Bloch sphere representation the preparation of any state can be accomplished by rotations about two axes, since any transformation on a sphere is possible through a sequence of rotations about two axes.

Then, you will see that the control node performs a local CNOT operation, with the qubit they also want to use as the control in the distributed CNOT acting as the control qubit, and their communication qubit as the target. The point of this step is to entangle the control and communication qubits. This effectively transfers information about the state of the control qubit into the joint entangled state of the communication qubits.

Following this operation, the control node measures their communication qubit, records the result, and sends the outcome to the target node using a classical message. If the outcome was 1, the target node will apply an X operation as a correction to their communication qubit. Measurement of the control node communication qubit transfers the entanglement so that it is between the distributed CNOT control qubit and the communication qubit of the target node. The corrective X that may be applied at the target node ensures that the entangled state does not depend on the measurement outcome.

Next you will see that the target node performs a local CNOT operation, with the communication qubit as control and the qubit they also want to use as the target of the distributed CNOT as the target. The point of this step is to entangle the target qubit with the state of the distributed CNOT control qubit and the remaining communication qubit.

The target node then measures their communication qubit in the X basis, as opposed to the Z basis that they usually measure in. Think of this change of basis as a rotation of the Bloch sphere so that the positive X axis takes the position of the positive Z axis. In the editor you will see that the target node does a Hadamard operation (given the symbol h) in order to make this basis change. Following the Hadamard operation they measure the communication qubit, now in the X basis. The target node records the measurement outcome and sends the result over a classical communication channel to the control node. If the outcome was 1, then the control node performs a corrective Z operation to the control qubit, completing the distributed CNOT.

For a different look at the distributed CNOT, you can check out the interactive circuit diagram, available here: Distributed CNOT circuit.

Inputs

In the editor, you can choose the state of both the control and target qubit, by specifying the angles that define each state in the Bloch sphere. 

In the context of a distributed computation, the two nodes would usually have no knowledge of the exact states of the control and target qubits, because they would depend on earlier stages of the computation.

Results

In the results page of the Editor, you will see four Bloch spheres -- one for each of the input control and target qubit states, as well as one for each of the output control and target states. To determine if the expected outcome was obtained, it may be helpful to consult the above table and the accompanying description of how to calculate the effect of the CNOT operation between any two quantum states.

If the final state of the pair of the control and target qubits is not as expected, then it indicates that an error occurred during the application.

Launch application