Intro to quantum computing: qubits, superposition, & more
Tags: programming, computerscience, learning, beginners
Published: 2021-08-19 20:21:03

Quantum computing is an overlap of math, physics, and computer science. While it’s not in widespread use today, it has the potential to become a very useful tool in many different industries. Quantum computing outperforms classical computing in many different ways, which means it can be used to help solve certain types of complex problems. Today, we’ll explore some of the basic aspects of quantum computing, such as qubits, quantum physics, use cases, and more.
 
**We’ll cover**:

* [Quantum computing and quantum computers](#quantum)
* [Quantum computers vs classical computers](#quantumvsclassical)
* [Qubits](#qubits)
* [The role of quantum physics](#physics)
* [Quantum computing use cases](#usecases)
* [Wrapping up and next steps](#nextsteps)
<br>

<a name="quantum"></a>

## Quantum computing and quantum computers

First, let's define what we mean when we say *quantum*. The term *quantum* comes from the study of quantum mechanics, which is a field of physics that explores the physical properties of nature on a small atomic and subatomic scale. It is the foundation of quantum physics. A lot of the work in the field describes the behavior and significance of small particles like atoms, electrons, and photons. 

Quantum computing uses the properties of **quantum states**, such as entanglement and superposition, to perform computation. Major tech companies such as IBM, Microsoft, Intel, and Google are adopting and investing in quantum computing and doing quantum computing research. There’s still a lot that we don’t understand about the quantum world, but we know that there’s a lot of potential in quantum computing. From what we understand, quantum computers can hold and process large amounts of data, which means we have a lot of computing power to use in fields that require **complex calculations**.

Quantum computers are the devices used to perform quantum computations. Quantum computers host quantum processors that can isolate quantum particles so they can be manipulated and studied. There are different ways to control those quantum particles. One of the ways is to cool the processor down to freezing temperatures. Another way is to manipulate the particles using lasers. 
 
### How does a quantum computer work?

Quantum computers are based on **quantum superposition**. Superposition allows quantum objects to simultaneously exist in more than one state or location. This means that an object can be in two states at one time while remaining a single object. This allows us to explore much richer sets of states.

Quantum computers use the entanglement of qubits and superposition probabilities to perform operations. These operations can be manipulated so that certain probabilities are increased or decreased, which leads us to the correct and incorrect answers we’re looking for. Quantum computers have a **large capacity** to take on many different paths.

A quantum computer consists of **three main parts**:

* A part that holds qubits
* A part that transfers signals to the qubits
* A classical computer that can run programs and give instructions

As mentioned earlier, there are different ways to manipulate quantum particles. In some quantum computers, the part that holds the qubits is kept at a freezing temperature to enhance coherence and minimize interface. In other quantum computers, the part that holds the qubits is kept in a vacuum chamber that reduces vibrations and helps to balance the qubits. The part of the quantum computer that transfers signals to the qubits can use microwaves, lasers, and voltage to send those signals.

> ***What is quantum supremacy?***
Many organizations involved in quantum computing are working toward a goal of quantum supremacy. Quantum supremacy would demonstrate a quantum device that can solve a problem that no classical computer can solve in a viable amount of time. While current quantum computers have had some amazing accomplishments, we’re still unable to prove quantum supremacy for useful, real-world problems.

<br>

<a name="quantumvsclassical"></a>

## Quantum computers vs classical computers

Let’s explore some of the major differences between quantum computers and classical computers.

* **Information processing**: While conventional computers rely on transistors, which represent the binaries *0* or *1*, quantum computers use qubits. Qubits follow the superposition principle and can represent both *0* and *1* at the same time.

* **Power**: The power of quantum computers grows exponentially in proportion to the number of qubits linked together. This is different from what happens in classical computing. The power of a classical computer increases linearly with the number of transistors. 

* **Applications**: Quantum computers are better suited for complex tasks, such as optimization problems, data analysis and processing, and simulations. Classical computers are better for our everyday processing needs.

* **Building blocks**: Superconducting Quantum Interface Devices (SQUID) or quantum transistors are the basic building blocks of quantum computers. Classical computers use CMOS transistors.

* **Data processing**: In quantum computing, data processing occurs in the Quantum Processing Unit (QPU), which consists of interconnected qubits. In classical computing, data processing occurs in the Central Processing Unit (CPU), which consists of the Arithmetic and Logic Unit (ALU, processor registers, and a control unit.

* **Information representation**: Classical computers use bits, while quantum computers use qubits.

* **Speed**: Quantum computers can solve certain problems hundreds of millions of times faster than traditional computers. For example, in 2019, Google’s quantum computer did a calculation in less than four minutes that would take the world’s most powerful supercomputer 10,000 years to do.
<br>

<a name="qubits"></a>

## Qubits

A quantum bit, or qubit, can represent zero, one, or both at the same time. It is the **basic unit of quantum information**, and it is the smallest possible unit of digital information. Quantum information is data for quantum states. A qubit can be built using any two-level quantum system. There are many ways to build qubits. Unlike transistors in classical computing, we still don’t know the optimal way to build a qubit. This is a big focus in quantum computing research.
 
We can manipulate the state of qubits to perform meaningful quantum computations. A qubit can have **many different states**. One of the key aspects is that all quantum operations have to be reversible. Quantum logic gates are basic quantum circuits that operate on a small number of qubits. They are the building blocks of quantum circuits, and they perform operations on qubits. Quantum circuits consist of a combination of multiple quantum gates applied on some qubits.
 
### Superconducting qubits

Superconducting quantum computing is an implementation of quantum computing. Companies such as Google, IBM, and Intel are researching superconducting quantum computing. Superconducting qubits have **faster gate speeds** and are solid-state fabrications. They are the most advanced of the qubit technologies, and they’re built using existing semiconductor techniques.
<br>

<a name="physics"></a>

## The role of quantum physics

Now, we’ll move into some aspects of quantum physics and how they play a role in quantum computing.
 
### Quantum interference

Quantum interference is a byproduct of superposition. It allows us to **bias the measurement** of a qubit toward a desired state or set of states. Remember that a qubit can be zero or one or both at the same time because of superposition. Qubits have a certain probability of collapsing to zero or one depending on their arrangement. This probability is determined by quantum interference. In short, quantum interference allows us to affect the state of a qubit to influence the probability of the **desired outcome**. 
 
### Quantum entanglement

One of the quantum properties involved in quantum computing is called entanglement. Quantum entanglement allows two or more quantum particles to become entangled. When these particles become entangled, they become a **single system**. This means that all of the quantum particles within that entanglement are described as one unit. Quantum entanglement gives qubits more computing power because it adds more qubits to a system. Whenever we apply an operation to one particle, it correlates to the other entangled particles as well.
 
### Quantum decoherence

Quantum decoherence is the aspect of quantum physics that **hinders the progress** of quantum computing. When we try to observe or measure quantum particles, it can collapse the superposition state. This is called decoherence. Quantum decoherence leads to errors in quantum computational systems. It makes it difficult to preserve superpositions for a long enough time to perform calculations that are actually useful.

Coherence length refers to the amount of time that a qubit can hold its quantum properties. To increase this length and build fault-tolerant quantum computers, we need to use Quantum Error Correction (QEC). We can use QEC to prolong coherence length by correcting decoherence errors.
<br>

<a name="usecases"></a>

## Quantum computing use cases

Quantum computing has many real-world applications. Current researchers are searching for the best quantum algorithms that will outperform classical algorithms. While we still have a long way to go before we can use quantum computing on a large, useful scale, we already know some fields and industries that will benefit from quantum computing. Let’s take a look at some of its potential applications:

**Search**

Quantum algorithms could help speed up the solution to unstructured data searches.

**Quantum simulation**

Quantum computers can model other quantum systems because they have quantum phenomena in their computation. This means that we could simulate more complex quantum systems such as photosynthesis and superconductivity.

**Optimization**

Quantum computing can help us with our optimization problems. We can run quantum optimization algorithms to help us find better ways to manage complex systems such as package deliveries and traffic flows.

**Cryptography** 

Quantum cryptography algorithms have the potential to crack traditional cryptography keys, which are currently too complex for classical computers to crack.

**Healthcare**

Quantum computing could help improve things like pricing, diagnostic assistance, imaging, and precision medicine.

**Finance**

Quantum algorithms could help speed up important financial calculations, which would help us make more informed projections.

**Chemical and biological engineering**

Chemical and biological engineering consists of the movement and interaction of quantum mechanics. The ability to simulate quantum mechanics was one of Richard Feynman’s main motivations to build a quantum computer. Quantum simulations could help engineers predict the properties of new molecules, which would help us in materials discovery and pharmaceutical development.

**Artificial intelligence**

Quantum computing could help us process very large amounts of data to help us make more informed decisions and predictions in the world of AI. Quantum machine learning is a growing field that focuses on how quantum algorithms can help speed up AI efforts.
<br>

<a name="nextsteps"></a>

## Wrapping up and next steps
Congrats on taking your first steps with quantum computing! We’re still in the early stages of making quantum computing a reality. There’s a lot more work and research to be done. While quantum computing isn’t quite ready for the world yet, it has the potential to be a very powerful tool across many different industries. 

We covered only *some* of the basic information about quantum computing. There’s still more to learn, such as:
* Shor's algorithm
* Simulating quantum states
* Quantum computing libraries and frameworks

To get started learning these concepts and more, check out Educative's course [**The Fundamentals of Quantum Computing**](https://www.educative.io/courses/fundamentals-quantum-computing). In this curated course, you’ll cover the fundamentals of quantum computing, such as qubits, quantum gates, and quantum algorithms. By the end, you’ll have the foundations in place to start exploring more applications of quantum computing.

*Happy learning!*
<br>

### Continue reading about computing

* [Bytesize: Quantum computing and the future of programming](https://www.educative.io/blog/bytesize-quantum-computing)
* [Algorithms 101: How to check if a string is a palindrome](https://www.educative.io/blog/algorithms-101-check-string-palindrome)
* [Computer number systems 101: Binary and hexadecimal conversions](https://www.educative.io/blog/computer-number-systems-binary-hexadecimal-conversions)