I have done some sort of online research on qubits and the factors making them infamous i.e allowing qubits to hold 1 and 0 at the same time and another is that qubits can be entangled somehow so that they can have related data in them no matter how far they are (even at opposite sides of the galaxies).

While reading about this on Wikipedia I have seen some equation which is still difficult for me to comprehend. Here's the link to Wikipedia.


  1. How are they entangled in the first place?

  2. How do they relate their data?

  • 2
    $\begingroup$ Can you consider linking to the Wikipedia article/include the formula in your question? This will make it easier for others to understand what exactly your problem is. $\endgroup$ – MEE the sneaky user Apr 7 '18 at 11:27

For a simple example suppose you have two qubits in definite states $|0\rangle$ and $|0\rangle$. The combined state of the system is $|0\rangle\otimes |0\rangle$ or $|00\rangle$ in shorthand.

Then if we apply the following operators to the qubits (image is cut from superdense coding wiki page), the resulting state is an entangled state, one of the bell states.

enter image description here

First in the image we have the hadamard gate acting on the first qubit, which in a longer form is $H\otimes I$ so that it is the identity operator on the second qubit.

The hadamard matrix looks like $$H=\frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}$$ where the basis is ordered $\{|0\rangle,|1\rangle\}$.

So after the hadamard operator acts the state is now

$$(H\otimes I)(|0\rangle\otimes|0\rangle)=H|0\rangle\otimes I |0\rangle=\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)\otimes (|0\rangle)=\frac{1}{\sqrt{2}}(|00\rangle+|10\rangle)$$

The next part of the circuit is a controlled not gate, which only acts on the second qubit if the first qubit is a $1$.

You can represent $CNOT$ as $|0\rangle\langle0|\otimes I+|1\rangle\langle1|\otimes X$, where $|0\rangle\langle0|$ is a projection operator onto the bit $0$, or in matrix form $\begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}$. Similarly $|1\rangle\langle1|$ is $\begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix}$.

The $X$ operator is the bit flip operator represented as $\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$.

Overall the $CNOT$ matrix is $\begin{pmatrix} 1 & 0 &0 & 0 \\ 0 & 1 &0 & 0 \\ 0 & 0 &0 & 1 \\0 & 0 &1 & 0 \\\end{pmatrix}$

When we apply the $CNOT$ we can either use matrix multiplication by writing our state as a vector $\begin{pmatrix}\frac{1}{\sqrt{2}} \\ 0 \\ \frac{1}{\sqrt{2}} \\0 \end{pmatrix}$, or we can just use the tensor product form.

$$CNOT (\frac{1}{\sqrt{2}}(|00\rangle+|10\rangle))=\frac{1}{\sqrt{2}}(|00\rangle+|11\rangle)$$

We see that for the first part of the state $|00\rangle$ the first bit is $0$, so the second bit is left alone; the second part of the state $|10\rangle$ the first bit is $1$, so the second bit is flipped from $0$ to $1$.

Our final state is $$\frac{1}{\sqrt{2}}(|00\rangle+|11\rangle)$$ which is one of the four Bell states which are maximally entangled states.

To see what it means for them to be entangled, notice that if you were to measure the state of the first qubit say, if you found out that it was a $0$ it immediately tells you the second qubit also has to be a $0$, because thats our only possibility.

Compare to this state for instance:


If you measure that the first qubit is a zero, then the state collapses to $\frac{1}{\sqrt{2}}(|00\rangle+|01\rangle)$, where there is still a 50-50 chance the second qubit is a $0$ or a $1$.

Hopefully this gives an idea how states can be entangled. If you want to know a particular example, like entangling photons or electrons etc, then you would have to look into how certain gates can be implemented, but still you might write the mathematics the same way, the $0$ and $1$ might represent different things in different physical situations.

Update 1: Mini Guide to QM/QC/Dirac notation

Usually there's a standard computational (ortho-normal) basis for a single qubit which is $\{|0\rangle,|1\rangle\}$, say $\mathcal{H}=\operatorname{span}\{|0\rangle,|1\rangle\}$ is the vector space.

In this ordering of the basis we can identify $|0\rangle$ with $\begin{pmatrix} 1\\ 0 \end{pmatrix}$ and $|1\rangle$ with $\begin{pmatrix} 0\\ 1 \end{pmatrix}$. Any single qubit operator then can be written in matrix form using this basis. E.g. a bit flip operator $X$ (after pauli-$\sigma_x$) which should take $|0\rangle\mapsto |1\rangle$ and $|1\rangle \mapsto |0\rangle$, can be written as $\begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix}$, the first column of the matrix is the image of the first basis vector and so on.

When you have multiple say $n$-qubits they should belong to the space $\mathcal{H}^{\otimes n}:=\overbrace{\mathcal{H}\otimes\mathcal{H}\otimes\cdots\otimes \mathcal{H}}^{n-times}$. A basis for this space is labelled by strings of zeros and ones, e.g. $|0\rangle\otimes|1\rangle\otimes |1\rangle\otimes\ldots \otimes|0\rangle$, which is usually abbreviated for simplicity as $|011\ldots0\rangle$.

A simple example for two qubits, the basis for $\mathcal{H}^{\otimes 2}=\mathcal{H}\otimes \mathcal{H}$, is $\{|0\rangle\otimes|0\rangle,|0\rangle\otimes|1\rangle,|1\rangle\otimes|0\rangle,|1\rangle\otimes|1\rangle\}$ or in the shorthand $\{|00\rangle,|01\rangle,|10\rangle,|11\rangle\}$.

There's different ways to order this basis in order to use matrices, but one natural one is to order the strings as if they are numbers in binary so as above. For example for $3$ qubits you could order the basis as $$\{|000\rangle,|001\rangle,|010\rangle,|011\rangle,|100\rangle,|101\rangle,|110\rangle,|111\rangle\}.$$

The reason why this can be useful is that it corresponds with the Kronecker product for the matrices of the operators. For instance, first looking at the basis vectors: $$|0\rangle\otimes |0\rangle=\begin{pmatrix} 1\\ 0 \end{pmatrix}\otimes \begin{pmatrix} 1\\ 0 \end{pmatrix}:=\begin{pmatrix} 1\cdot\begin{pmatrix} 1\\ 0 \end{pmatrix} \\ 0\cdot\begin{pmatrix} 1\\ 0 \end{pmatrix} \end{pmatrix}=\begin{pmatrix} 1\\ 0\\0\\0 \end{pmatrix}$$


$$|0\rangle\otimes |1\rangle=\begin{pmatrix} 1\\ 0 \end{pmatrix}\otimes \begin{pmatrix} 0\\ 1 \end{pmatrix}:=\begin{pmatrix} 1\cdot\begin{pmatrix} 0\\ 1 \end{pmatrix} \\ 0\cdot\begin{pmatrix} 1\\ 0 \end{pmatrix} \end{pmatrix}=\begin{pmatrix} 0\\ 1\\0\\0 \end{pmatrix}$$

and similarly

$$|1\rangle\otimes |0\rangle=\begin{pmatrix} 0\\ 0\\1\\0 \end{pmatrix},\quad |1\rangle\otimes |1\rangle=\begin{pmatrix} 0\\ 0\\0\\1 \end{pmatrix}$$

If you have an operator e.g. $X_1X_2:=X\otimes X$ which acts on two qubits and we order the basis as above we can take the kronecker product of the matrices to find the matrix in this basis:

$$X_1X_2=X\otimes X=\begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix}\otimes \begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix} = \begin{pmatrix} 0\cdot\begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix} & 1\cdot\begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix}\\ 1\cdot\begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix} & 0\cdot \begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix} \end{pmatrix}=\begin{pmatrix} 0 &0&0&1\\ 0 &0&1&0\\0 &1&0&0\\1 &0&0&0\\ \end{pmatrix}$$

If we look at the example of $CNOT$ above given as $|0\rangle\langle0|\otimes I+|1\rangle\langle1|\otimes X$.$^*$ This can be computed in matrix form as $\begin{pmatrix} 1 & 0\\ 0 & 0 \end{pmatrix}\otimes \begin{pmatrix} 1 & 0\\ 0 & 1 \end{pmatrix}+\begin{pmatrix} 0 & 0\\ 0 & 1 \end{pmatrix}\otimes\begin{pmatrix} 0 & 1\\ 1 & 0 \end{pmatrix}$, which you can check is the $CNOT$ matrix above.

It's worthwhile getting used to using the shorthands and the tensor products rather than converting everything to matrix representation since the computational space grows as $2^n$ for $n$-qubits, which means for three cubits you have $8\times 8$ matrices, $4$-qubits you have $16\times 16$ matrices and it quickly becomes less than practical to convert to matrix form.

Aside$^*$: There are a few common ways to use dirac notation, to represent vectors like $|0\rangle$; dual vectors e.g. $\langle 0|$, inner product $\langle 0|1\rangle$ between the vectors $|0\rangle$ and $|1\rangle$; operators on the space like $X=|0\rangle\langle1|+|1\rangle\langle0|$.

An operator like $P_0=|0\rangle\langle0|$ is a projection operator is a (orthogonal) projection operator because it satisfies $P^2=P$ and $P^\dagger=P$.

  • $\begingroup$ I've failed to see through the complete calculations part, as I don't have the fundamentals to simplify. But it helped me to get an idea! $\endgroup$ – Arshdeep Singh Apr 7 '18 at 12:21
  • $\begingroup$ @ArshdeepSingh I can try add in anything that helps in understanding. I could probably add a bit more about entangled states. Glad it was a bit helpful anyway :) $\endgroup$ – snulty Apr 7 '18 at 12:46
  • $\begingroup$ @snulty maybe if you use the vector notation for the qubits the calculations become more transparent? Just a suggestion. $\endgroup$ – Kiro Apr 7 '18 at 15:28
  • 1
    $\begingroup$ @Kiro I've added a small bit about vector/matrix notation, only you might want to move away form that notation where possible in order to avoid multiplying large matrices by hand. $\endgroup$ – snulty Apr 7 '18 at 19:31

Although the linked wikipedia article is trying to use entanglement as a distinguishing feature from classical physics, I think one can start to get some understanding about entanglement by looking at classical stuff, where our intuition works a little better...

Imagine you have a random number generator that, each time, spits out a number 0,1,2 or 3. Usually you'd make these equally probability, but we can assign any probability to each outcome that we want. For example, let's give 1 and 2 each with probability 1/2, and never give 0 or 3. So, each time the random number generator picks something, it gives 1 or 2, and you don't know in advance what it's going to be. Now, let's write these numbers in binary, 1 as 01 and 2 as 10. Then, we give each bit to a different person, say Alice and Bob. Now, when the random number generator picks a value, either 01 or 10, Alice has one part, and Bob has the other. So, Alice can look at her bit, and whatever value she gets, she knows that Bob has the opposite value. We say these bits are perfectly anti-correlated.

Entanglement works much the same way. For example, you might have a quantum state $$\left|\psi\right\rangle=\frac{1}{\sqrt{2}}\left(\left|01\right\rangle-\left|10\right\rangle\right)$$ where Alice holds one qubit of $\left|\psi\right\rangle$, and Bob holds the other. Whatever single-qubit projective measurement Alice chooses to make, she'll get an answer 0 or 1. If Bob makes the same measurement on his qubit, he always gets the opposite answer. This includes measuring in the Z-basis, which reproduces the classical case.

The difference comes from the fact that this holds true for every possible measurement basis, and for that to be the case, the measurement outcome must be unpredictable, and that's where it differs from the classical case (you may like to read up about Bell tests, specifically the CHSH test). In the classical random number example I described at the start, once the random number generator has picked something, there's no reason why it can't be copied. Somebody else would be able to know what answer both Alice and Bob would get. However, in the quantum version, the answers that Alice and Bob get do not exist is advance, and therefore nobody else can know them. If somebody did know them, the two answers would not be perfectly anti-correlated. This is the basis of Quantum Key Distribution as it basically describes being able to detect the presence of an eavesdropper.

Something further that may help in trying to understand entanglement: mathematically, it’s no different to superposition, it’s just that, at some point, you separate the superposed parts over a great distance, and the fact that that is in some sense difficult to do means that making the separation provides you with a resource that you can do interesting things with. Really, entanglement is the resource of what one might call ‘distributed superposition’.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.