Crash Course in Quantum Computing Using Very Colorful Diagrams

Almost everything you need to know about Quantum Computing explained using very intuitive drawings…

Rishabh AnandFollow
Mar 16

Have a quantum cartoon

Quantum Computing is a relatively new, up-and-coming field that smashes the concepts of Quantum Physics, or the study or very small things, and Computer Science.

In this article, I’ll introduce you to the concepts that drive this young, growing field with intuitive analogies and as always, colorful sketches and drawings.

Note: I won’t be covering the math and vector notations in this article for simplicity purposes. If interested in reading such an article, drop a comment below or feel free to contact me via Twitter!

Information representation in classical Computer Science

Classical CS involves the flow and manipulation of bits (binary digits) — the basic units of information in a computer. It can hold the value of either 1 or 0, not both at the same time.

The 1 or 0 usually correspond to the charge of an atom on the hardware, which represents the true/false or on/off states in a computer.

The change of these charges results in the flipping of bits from 1 to 0 or vice versa, allowing information to flow from one location in the memory to another.

Traditional bits are just charges on computer hardware that store information depending on their charge.

Representing information in Quantum Computing

In a traditional computer, information is represented using traditional bits that can only possess a value of 1 or 0 and not both at the same time. In Quantum computers, we represent information using Qubits (quantum bits).

We can represent Qubits using the bra-ket notations: |0⟩ or |1⟩, pronounced ‘ket 0’ and ‘ket 1’ respectively.

Well, in Quantum Computing, the Qubit can have the values of both 1 and 0 simultaneously because of a process called Superposition.
The curious case of Superposition

Superposition refers to a phenomenon where a particle or entity can exist in two states at the same time. It can exist as two things or exist in two different positions. For instance, let’s look at the Schrodinger’s Cat paradox.

If you lock a cat inside a soundproof, inescapable bunker with some explosive material that may likely explode, the cat is in a Superposition of both deadand alive because you don’t know if the material really blew up or not (probably because the bunker is soundproof).

There is a 50–50 chance of the explosive material either blowing up and killing the cat or staying as is. This is taken from the Minute Physics video on Quantum Superposition

The cat is technically both dead and alive so long as you don’t open the bunker and check.

However, a quirky situation arises when an observer actually checks the state of an object in Superposition. In this case, reality collapses to one single outcome and it cannot exist in multiple states at the same time anymore. Similarly, if you can’t hold it in anymore and open the bunker, you may see that the cat is dead.
Guess what? Your curiosity killed the cat…

Or, the cat could still be alive when you check. When an observer (you, in this case) observes an object that was initially in Superposition, they will only see one of n-number of outcomes unfold in front of their eyes. As mentioned before, reality collapses to one of the outcomes.

How is this related to Quantum Computing?

A Qubit can exist in a Superposition, carrying the value of both 1 and 0 at the same time. This opens up a whole new world of possibilities for solving complex problems that require lots of computational power.

Qubits can exist in 2 possible states until observed (which causes reality to collapse to one of the states)

Traditional Logic Gates

In order to manipulate fundamental bits, they must be transformed by logic gates that either flips bits to another value or let them remain as they are. Some famous examples of logic gates include AND, OR, NOT, XOR and NAND.

They take pairs of bit values and transform them to either a 1 or 0 depending on the functionality of the gate.

An example of a NAND gate that takes in pairs of similar bits and returns the flipped bit

Quantum Logic Gates

To transform Qubits, we pass them through Quantum Logic Gates (or Quantum Gates) that maps the existing state of a Qubit to another state based on the functionality of the gate.

This may sound vague, but Quantum Gates are practically classical logic gates that act on Qubits instead of traditional bits. Quantum Gates can invariably perform all the actions that standard classical logic gates can.

Let’s look at a few examples of Quantum Gates:
Hadamard Gate

Perhaps the most common, the Hadamard Gate takes in a single Qubit as input and outputs a Qubit that has a 50–50 chance of either being a 1 or a 0.

In simple mathematical terms, there is an equal probability of the Qubit collapsing to a 1 or 0. This in itself is a Superposition where the output Qubit has two possible states until we observe it or use it in further calculations.

The Hadamard Gate is represented by an ‘H’ in a box and can be added to a circuit multiple times to output a bit that has an equal chance of being a 1 or 0.

The Hadamard Gate

There’s a 50–50 chance of the Qubit collapsing to either a 1 or 0
Pauli-X Gates

Named after Wolfgang Pauli (awesome name by the way), the Pauli-X Gate takes in a single Qubit. It is essentially the equivalent to the NOT Gate which negates the bits and flips them. It performs a bit flip on the Qubits. It maps/changes a |0⟩ to |1⟩ and |1⟩ to |0⟩.
The Quantum equivalent of the NOT Gate — The Pauli Gate

The Pauli-X Gate performs a bit flip and negates the Qubits
Controlled-NOT Gate

The Controlled NOT gate is also called the CNOT Gate. This takes in 2 Qubits and only flips the second Qubit from a |0⟩ to |1⟩ and |1⟩ to |0⟩ if the first Qubit is |1⟩. Otherwise, it leaves it unchanged.

The CNOT or Controlled-NOT Gate

The CNOT gate only flips the second Qubit if the first Qubit is |1⟩


Measurement is a special type of operations done on Qubits at the end of a circuit to get the final values of the Qubits after the operations have been conducted.

Compared to the gates above, Measurement is irreversible and hence, is not a Quantum Gate. I mentioned earlier that when an observer looks at something that was initially in a Superposition, reality collapses to one of the outcomes.

Similarly, the Measurement function is the observer and takes the collapsed Qubits’ values and puts them together as the final output bits that are either 1 or 0 strictly.
The Measurement function is represented as this symbol in a Quantum Circuit

The Measurement function takes in a Qubit and observes it to collapse its state to either 1 or 0.

Representing Quantum models

Models are what physicists use to simulate and observe what happens when you poke the universe in a certain way. They help a great deal when it comes to visualization.

Similarly, Quantum models represent situations that deal with numerous Quantum phenomenon (such as Superposition, for instance).
How do we represent a mathematical quantum model on a computer?

We do so by using Quantum Circuits. Circuits represent computational processes in which Qubits are passed through Quantum Logic Gates that transform Qubits from one state to another depending on their type/functionality.

To build a Quantum Circuit, we need a combination of Quantum Logic Gates and Qubits through time to get the desired outcome. To visualize what a Quantum Circuit looks like, take a look at the figure below.

The figure shows three Qubits, all with states |0⟩ or ket 0. The H in the boxes represent Quantum Logic Gates (H is the Hadamard gate).

In this figure, we can see the Qubits going through a Hadamard Gate each. The second and third Qubits go through another Hadamard Gate each.

By putting together these Quantum Gates and Qubits in a Circuit, you can visualize the flow of information through the Circuit.

In a nutshell

In this article, I tried to summarise the seemingly-difficult theory behind Quantum Computing. Quantum Computing is an up-and-coming field that has a very small community. I’ll be covering the math and vector notations in upcoming articles on Quantum Computing.

If you want me to cover anything else, drop a comment below or reach out to me on Twitter or LinkedIn. Soon, I’ll be taking you through making your own Quantum Circuit in simple Python (Yes. I said Python).

If there are any mistakes I’ve made, please do let me know (I’m learning too!).

Until then, see you in the next one!

Long-distance quantum information exchange—success at the nanoscale

Researchers at the Niels Bohr Institute cooled a chip containing a large array of spin qubits below -273 Celsius.  To manipulate individual electrons within the quantum-dot array, they applied fast voltage pulses to metallic gate electrodes located on the surface of the gallium-arsenide crystal (see scanning electron micrograph). Because each electron also carries a quantum spin, this allows quantum information processing based on the array’s spin states (the arrows on the graphic illustration). During the mediated spin exchange, which only took a billionth of a second, two correlated electron pairs were coherently superposed and entangled over five quantum dots, constituting a new world record within the community. Credit: Niels Bohr Institute

Read more at:

Aliens Might Shoot Lasers at Black Holes to Travel the Galaxy

An astronomer at Columbia University has a new guess about how hypothetical alien civilizations might be invisibly navigating our galaxy: Firing lasers at binary black holes (twin black holes that orbit each other).
The idea is a futuristic upgrade of a technique NASA has used for decades.
Right now, spacecraft already navigate our solar system using gravity wells as slingshots. The spacecraft itself enters orbit around a planet, flings itself as close as possible to a planet or moon to pick up speed, and then uses that added energy to travel even faster toward its next destination. In doing so, it saps away a tiny fraction of the planet's momentum through space — though the effect is so minimal it's pretty much impossible to notice. [9 Strange, Scientific Reasons We Haven't Found Aliens Yet]

How Artificial Intelligence Is Changing Science

My Bookmarks



How Artificial Intelligence Is Changing Science

The latest AI algorithms are probing the evolution of galaxies, calculating quantum wave functions, discovering new chemical compounds and more. Is there anything that scientists do that can’t be automated?

Read the article


Why Artificial Intelligence Has Trouble With the Real World

The latest artificial intelligence systems start from zero knowledge of a game and grow to world-beating in a matter of hours. But researchers are struggling to apply these systems beyond the arcade.

Read the article


To Build Truly Intelligent Machines, Teach Them Cause and Effect

Judea Pearl, a pioneering figure in artificial intelligence, argues that AI has been stuck in a decades-long rut. His prescription for progress? Teach machines to understand the question why.

Read the interview


The Math That Tells Cells What They Are

During development, cells seem to decode their fate through optimal information processing, which could hint at a more general principle of life. 

Read the article


How Life (and Death) Spring From Disorder




Math Duo Maps the Infinite Terrain of Minimal Surfaces

A pair of mathematicians has built on an obscure, 30-year-old mathematical theory to show that soap-filmlike minimal surfaces appear abundantly in a wide range of shapes. 

Read the article


3-D Fractals Offer Clues to Complex Systems




Where Proof, Evidence and Imagination Intersect

In mathematics, where proofs are everything, evidence is important too. But evidence is only as good as the model, and modeling can be dangerous business. So how much evidence is enough? 

Read the column


Without a Proof, Mathematicians Wonder How Much Evidence Is Enough




A New World’s Extraordinary Orbit Points to Planet Nine

Astronomers argue that there’s an undiscovered giant planet far beyond the orbit of Neptune. A newly discovered rocky body has added evidence to the circumstantial case for it. 

Listen to the podcast
Follow Quanta

Machine Learning Algorithm for Quantum Computers

IBM Develops Machine Learning Algorithm Fit for Quantum Computers

IBM announced today that it has developed and tested quantum algorithms that have shown the potential to enable practical machine learning applications on future generations of quantum computers.

Machine Learning Accelerated by Quantum Computers

IBM has recently said that it expects to achieve a “quantum advantage” over classical computers in the coming years. The more powerful quantum computers can then be paired with machine learning algorithms that have been optimized for this type of system to achieve results that wouldn’t have been possible on any classical computer or supercomputer previously. 
IBM was able to use short-depth circuits to classify data in a way that also dealt with the expected decoherence (loss of state) in a quantum computer. The classification was done by a machine learning algorithm that was optimized for quantum computing. The classification showed no errors, even though IBM’s quantum computers experienced decoherence.

Complex Feature Mapping

According to IBM, both classical and quantum computing algorithms can break down a picture, for example, into its individual pixels and then place those pixels in a grid based on each pixel’s color value. This technique is called “feature mapping,” and the more precise this data can be classified, according to specific characteristics, the better the machine learning system will perform. The goal of matching quantum computers with machine learning is to create more sophisticated feature maps, which can allow the artificial intelligence (AI) system to identify patterns that could be invisible to classical computers.

The feature-mapping algorithms IBM developed for quantum computers was only tested on a simulation of a two-qubit quantum computer, but it still showed that there is a promising path forward for machine learning algorithms that run on quantum computers. IBM believes its machine learning algorithms could soon classify far more complex data sets than any classical computer could handle.

IBM’s algorithms demonstrating how entanglement can improve AI classification accuracy will be available as part of IBM’s Qiskit Aqua, an open-source library of quantum algorithms.,38808.html

IBM Introduces ‘Quantum Volume’ to Track Progress Towards the Quantum Age

Quantum computing companies are racing to squeeze ever more qubits into their devices, but is this really a solid sign of progress? IBM is proposing a more holistic measure it calls “quantum volume” (QV) that it says gives a better indication of how close we are to practical devices.

Physicists reverse time using quantum computer

Researchers from the Moscow Institute of Physics and Technology teamed up with colleagues from the U.S. and Switzerland and returned the state of a quantum computer a fraction of a second into the past. They also calculated the probability that an electron in empty interstellar space will spontaneously travel back into its recent past. The study is published in Scientific Reports.

Quantum Physics Experiment Suggests That Reality Isn't Objective

A new quantum physics experiment just lent evidence to a mind-boggling idea that was previously limited to the realm of theory, according to the MIT Technology Review - that under the right conditions, two people can observe the same event, see two different things happen, and both be correct.

According to research shared to the preprint server arXiv on Tuesday, physicists from Heriot-Watt University demonstrated for the first time how two people can experience different realities by recreating a classic quantum physics thought experiment.

The experiment involves two people observing a single photon, the smallest quantifiable unit of light that can act as either a particle or a wave under different conditions.

The photon can exist in one of two alignments, but until the moment someone actually measures it to determine which, the photon is said to exist in a superposition - both conditions are true at the same time.

In the thought experiment, a scientist quietly analyzes the photon and determines its alignment.

Another scientist, unaware of the first's measurement, is able to confirm that the photon - and thus the first scientist's measurement - still exists in a quantum superposition of all possible outcomes.

As a result, each scientist experienced a different reality. Both are technically true, even though they disagree with each other.

Bringing this idea from thought experiment to reality involved an experimental setup with lasers, beam splitters, and a series of six photons that were measured by various pieces of equipment that stood in for the two scientists.

Other researchers previously devised the experimental setup, according to MIT Tech, but this is the first time that anyone managed to pull the experiment off.

Though the research has yet to be vetted and published by an academic journal, its findings lend real evidence to the sort of brain-melting ideas that wow physics undergrads - when it comes to the realm of quantum physics, there may be no such thing as a shared objective reality.

This article was originally published by Futurism. Read the original article.

Living Near a Supermassive Black Hole

It would pose some dangers, of course—but it could also be fun!

If civilizations form in, or migrate to, the vicinity of black holes, what could they do for fun and profit? The following top 10 activities come to mind:

Using the black hole as a source of clean energy by dumping trash through the accretion disk of matter that swirls around it. Up to 42 percent of the rest mass of this trash can be converted to radiation at the ISCO of a maximally spinning black hole.

Coupling some engineered device to the spin of the black hole, as a giant flywheel from which spin energy can be harnessed.

Surfing with light sails on relativistic jets at speeds approaching that of light.

Prolonging youth by visiting beauty salons to near the horizon of the black hole, where time is ticking more slowly as a result of gravitational redshift.

Viewing the spectacle of the entire universe reflected and distorted as gravitationally lensed images around the black hole.

Establishing an amusement park at the so-called “photon sphere,” where one could enjoy relativistic effects for fun, such as seeing oneself from behind by looking straight ahead as light circles around the black hole.

Taking advantage of new opportunities for space travel. For example, when the Milky Way and its sister galaxy Andromeda merge billions of years from now, the two black holes at their centers will pair into a tight binary, which should act as a gravitational slingshot and eject stars or planets at up to the speed of light, as described in two papers that the author wrote with James Guillochon. Travel agencies may offer tickets to exceptional rides on ejected planets that traverse the entire universe.

Sending criminals into the black hole as the ultimate prison with a death sentence at the singularity. The mass of the black hole will determine how much time is left for the prisoners to live. The lesser their crime, the more massive the black hole would be, extending their remaining life span after crossing the “prison walls” associated with the black hole horizon.

Using gravitational waves from small objects orbiting the black hole for communication. Such signals cannot be blocked by any known form of matter.

Testing fundamental aspects of quantum gravity through organized trips for string physics experimentalists.