The phenomenon of entanglement is perhaps the most prominent feature of quantum mechanics. In this tutorial you can learn how this can be done with the quantum circuit simulator and how entanglement is reflected in the measurement outcomes.

Open the quantum circuit simulator in a separate window

The phenomenon of entanglement is perhaps the most prominent feature of quantum mechanics. As it happens, it is also crucial for quantum computers to outperform their classical counterparts. Therefore it is not uncommon for larger quantum algorithms to start off with the preparation of entangled pairs (or even groups) of qubits. Here you will learn how this can be done with the quantum circuit simulator and how entanglement is reflected in the measurement outcomes.

Creating an entangled pair of qubits

Use the  +  and  -  buttons in the Quantum Circuit box to setup the circuit simulator with two qubits q[0] and q[1].

To generate entanglement between two qubits we need two gates: The Hadamard gate H (which operates on a single qubit), and the Controlled-NOT gate CNOT (which operates on a pair of qubits). The Hadamard gate has been discussed above in “Superpositions, Randomness, and Interference”. The Controlled-NOT gate flips one qubit (the target) depending on the state of another qubit (the control). Its action on quantum states is defined by its action on the four basis states of two qubits:
|00CNOT|00|01CNOT|01|10CNOT|11|11CNOT|10Note how the state of the second (target) qubit is flipped if and only if the state of the first qubit (control) is |1. In the circuit simulator, the Controlled-NOT gate is depicted by a box with and connected by a line. The signifies the control qubit, the represents the target qubit.

To generate an entangled state, we first create a superposition state on the qubit q[0], and then use this qubit as the control of a Controlled-NOT gate with q[1] as the target. To do this, drop a Hadamard gate and a Controlled-NOT gate in the circuit simulator as follows:

Run this quantum circuit on the quantum simulator multiple times and observe the measurement outcomes. Can you theoretically explain the histogram? Can you explain with these results why entanglement cannot be used to send information faster than light?

Ⓒ2023 Tutorial by Nicolai Lang, Institute for Theoretical Physics III, University of Stuttgart