- Published on
Quantum Telepathy: Send More with Less Using Superdense Coding
- Authors
- Name
- Galih Laras Prakoso
- @galihlprakoso
I'll start this blog post with an illustration about information. When we talk about information, our intuition leads us to almost everything in our lives right now. Powered by Information Technology, we are flooded with information every minute of our lives from social media, online news, and more.
Most of our Information Technology today is driven by the immense power of Classical Computing (electronic devices that only understand 0 and 1). If our classical computers only understand 0 and 1, how can they be so powerful and become the backbone of modern Information Technology?
0 and 1 might seem simple, but imagine you have 24
slots that can store just 0 and 1 information. You could do a lot of things. For example, we can describe the 🔴 (Red) color using these slots just like how our Classical Computing understands the red color:
11111111 00000000 00000000
What's that? That's the binary representation of the red color using the RGB (Red, Green, Blue) system. In decimal, we see it as 255 0 0
. We know that we can get "all" possible colors by only using these fundamental colors. So 11111111 00000000 00000000
or 255 0 0
represents that the Red value is set to the maximum while the others (Green and Blue) are zero.
With 24 slots, we can describe different kinds of information. Wow, that's a lot. 🤔 So our Classical Computing, which might seem simple, can become powerful and solve many real-world problems using these very basic fundamentals (0 and 1).
Sending Information using Classical Computing
In a classical computer, we call that slot in the previous section a bit. To send those bits using Classical Computing, we need exactly the number of bits we want to send. Let's say you want to send 8 bits of information; you will need 8 bits to send that information. It makes sense because a single bit can only be in one state at a time (either 0 or 1).
So, what do we do when we want to send a large amount of data, and our computer doesn't have enough bits to send or process? Chill, we can still process or send those large amounts of data chunk by chunk. It might sound lame, but it satisfies our needs right now; nobody is really complaining about that.
What's this blog post about? It seems that we don't have any interesting problem with how our Classical Computing works. Yeah, that might be true for our daily personal lives. But our Classical Computing will struggle when we need to use it to solve more complex problems, like finding new kinds of drugs to cure diseases, modeling how natural events work, etc.
Luckily, we have Quantum Computing. Using Quantum Computers, we can send 2 bits of information using only 1 qubit. A qubit is the atomic representation of information in Quantum Computing, analogous to a bit in Classical Computing.
Superposition
In Classical Computing, a bit is the atomic part of its information and can only be in one state at a time (0 or 1). In Quantum Computing, 1 qubit can represent both states at the same time; it can be 0 and 1 simultaneously. This is what we call superposition in Quantum Computing.
So, it can be half zero and half one probabilistically at the same time. Don't worry about the mathematical syntax right now—nothing fancy there; it's just a way to describe a state in Quantum Computing. For now, you only need to know about:
- Bra-Ket notation: As you can see, we define a qubit state using this weird syntax . This is just another representation of a vector: , while is another representation of a vector: .
- Scalar: The scalar represents the probability of each state or the probability amplitude: . Why are we using a square root here? To calculate the actual probability, we need to get the squared absolute value of the scalars . So when the state is in superposition in this case, it means that it's in a state represented by a linear combination of half 0 and half 1.
Entanglement
Superposition is only one of the several strange capabilities of Quantum Computing. There's another one for you: Entanglement. Entanglement means that our qubits in quantum computing can become entangled. Once entangled, the qubits are somehow connected in a very strange way. Even if we bring these entangled qubits far apart, they remain entangled.
When the first qubit is measured as 0, the second qubit will automatically become 0, and vice versa. We can imagine this mathematically using the syntax above.
Quantum Circuits and Gates
In Quantum Computing, we can manipulate qubits using Quantum Circuits and Quantum Gates. As you can see in the thumbnail of this blog post, that’s a picture of Quantum Circuits and Quantum Gates. If this is your first time seeing them, don’t worry. Quantum Circuits are just like race circuits where qubits go in one direction while also being manipulated by gates. At a high level, it’s pretty simple, though the process might be quite challenging to understand.
Using these concepts, we’re going to learn about an awesome concept in Quantum Computing, which is...
Superdense Coding
You can think of Superdense Coding as a method or protocol that enables the capability of sending two classical bits using a single qubit. This method or protocol has huge potential to improve many aspects of information technology, including networking, cybersecurity, IoT, satellite communication, and more.
So, in my opinion, it’s totally worth investing our time to dive a little deeper to understand how it works. Let’s start with a simple problem illustration.
In this illustration, Alice wants to send the information 01
to Bob. Using classical computing, she would need to send both bits to Bob because classical computing only allows one state at a time per bit. In this illustration, she sends the first bit with the state 0
and the second bit with the state 1
.
Quantum Telepathy
This is one sample use case proving that Quantum Computing can outperform Classical Computing. Using Quantum Computing, Alice only needs to send one qubit instead of two. I will explain step by step what we need to do in Quantum Computing to help Alice improve her communication with Bob.
Let’s start with this initial Quantum Circuit:
Imagine that Alice and Bob are each holding one qubit, so there are two qubits in this circuit. Did I lie? I said we would only use one qubit, but here we should use two qubits? Yeah, that’s actually what I questioned when I first learned about Superdense Coding.
But no, I didn’t lie. What I mean by only using one qubit is when we’re talking about sending. We will see that Alice is not sending two qubits like she would in classical computing. Instead, she will only need to send her single qubit to Bob to convey her information.
So right now, the state of the two qubits that Alice and Bob hold would be:
Nothing special here, it's only static zero qubits. We name the combined state of the qubits of Alice and Bob as
Entangle their Qubits
This step is where the first magic of "Telepathy" happens. We can entangle the qubits that Alice and Bob hold by using these two Quantum Gates:
- (Hadamard Gate)
- (Controlled Not) Gate
The Hadamard gate evolves the state of a qubit into superposition. The CNOT gate simply inverts the target qubit's state if and only if the control qubit is 1. Let’s see it in action:
Applying the Hadamard gate to Alice’s qubit will transform her qubit into this state:
So, any Quantum Gate has its matrix representation. What I mean by applying a quantum gate to a quantum state is simply matrix-vector multiplication.
So far, it's just high school math 😮💨, nothing to worry about. Next, we need to apply the gate where Alice's qubit is the control and Bob's qubit is the target. This means that whenever Alice's qubit is 1
, Bob's qubit will be inverted. Before applying the gate, the combined state of Alice and Bob’s qubits () is:
Or:
After applying the gate:
Whenever Alice's qubit is 1
, Bob's qubit will be inverted (0 -> 1
). This means that their qubits are now entangled. The state of Bob's qubit will now depend on Alice's qubit.
After their qubits are entangled, they can go as far as they want. Scientists even say that the qubits would still be entangled no matter how far apart they are. When Alice is on Earth and Bob is on Mars, their qubits will still be entangled. Einstein called this event "Spooky Action at a Distance."
Now, let's imagine that Alice and Bob are separated:
Let's focus on Alice now. As you can see in the image above, Alice has some kind of interface with controlled operations connected to it. The first is the (Controlled Z) gate and the gate. This means that before sending her qubit to Bob, she will apply one or two operations depending on the information she wants to send.
- If Alice wants to send
00
, she will not perform any operation on her qubit. - If Alice wants to send
01
, she will perform a operation on her qubit. - If Alice wants to send
10
, she will perform a operation on her qubit. - If Alice wants to send
11
, she will perform both and operations on her qubit.
Let's break down the mathematical representation of each possible case.
Alice Wants to Send 00
In this case, Alice is not doing any operations on her qubit. So, the state of her qubit will be the same, nothing's changed.
Alice Wants to Send 01
Applying the gate on Alice's qubit, will transform the state from:
Become:
We just simply invert the state on Alice's qubit.
Alice Wants to Send 10
Applying the gate on Alice's qubit will simply transform the state from:
Become:
The sign changed from +
into -
. How it happens? To understand it completely. We need to start from our very initial state. First, Alice qubit in the state:
The combination of both qubits owned by Alice and Bob is represented by the tensor products of their qubit state:
Applying Hadamard operation on multiple systems (tensor products of two qubits in this case) is quite different. Before we could apply operation on state vector, we should multiply operation with (Identity Matrix). Because we can't apply 2 by 2 matrix to 1 by 4 matrix.
As you can see that by doing this, we get the 4 by 4 matrix. Now we could apply this operation into our multi-qubit state.
As you remember that to create entanglement, we need to apply the gate with Alice's qubit as control and Bob's qubit as target. matrix is having this matrix representation:
CNOT = \begin{pmatrix}1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{ pmatrix }
It's similar with matrix but as you can see in the third row, column 3 and 4 the matrix seems to be swapped. So what we need to do is just multiply this matrix with our qubit state in vector representation"
Or in Bra-ket notation would look like this:
Now as you can see, you see how two qubits are entangled in their matrix representations. How about gate?
It's similar with matrix but the in the bottom right is instead of . Similar to the previous operation that we need to do the tensor product of and .
Then we could apply this to our entangled qubits:
In Bra-ket notation:
Alice Wants to Send 01
In this case, Alice will apply gate to her qubit so the state becomes:
Alice Wants to Send 11
In this case, Alice will apply both the gate and gate to her qubit. So the state will simply becomes:
Alice Sends her Qubit to Bob
Now, Alice already applied a certain operation on her qubit based on information she wants to send. Next, Alice just need to give her qubit to Bob.
After Alice sends her qubit to Bob, the spotlight is on Bob. After Bob receives Alice's qubit, he cannot directly know what classical information Alice sent. He needs to perform some operations on the qubits (now he has two qubits).
First, he needs to perform a CNOT operation, followed by an operation on Alice's qubit before he finally measures those two qubits to get the classical information.
For the sake of simplification, I'll provide one example based on one of the use cases we've seen in the previous section. Let's say the classical information that Alice sent is 11
. First, Alice and Bob share entangled qubits:
Applying operation to the state could be represented by the result of multiplication of those two operations:
As usual, before we could apply this operation matrix to our state vector, we need to do the tensor product with matrix :
Performing the to the entangled qubits produced this matrix:
In Bra-ket notation:
Bob Applies the CNOT Operation
In matrix representation:
Bob Applies the H Operation
Last step is applying the operation to Alice's qubit.
The resulting state is:
Ooh, ooh, ooh, it's magic! You knooow.. ♫♪... Yes, it's true! With Quantum Computing, we can transfer two classical bits by sending just one qubit. Isn't that amazing? This is just one example of how Quantum Computing surpasses Classical Computing.
Understanding Superdense Coding opens the door to many more "magical" powers of Quantum Computing. There's so much more waiting for us to explore! Share your thoughts in the comments below! 🍻