Image Source: Wikimedia

A Primer On Quantum Computing

Arpit Goliya
Tecnología
Published in
7 min readJan 19, 2018

--

Quantum computers were proposed in the early 1980s by Richard Feynman, Paul Benioff and Yuri Manin. Later, David Deutsch’s work on quantum algorithms and universal quantum computer in mid-1980’s laid the foundations of the quantum theory of computation.

We are now in 2018 and we do have experimental quantum computers:

  1. IBM’s 20 qubit quantum computing machine available as a cloud service (IBM Q)
  2. D-Wave 2000Q system from D-Wave Systems (In 2013, Google invested in D-Wave)
  3. 19Q processor from Rigetti
  4. Tangle Lake from Intel

and platforms to try our hands on Quantum Programming:

  1. Microsoft’s Quantum Development Kit & Q# programming language
  2. IBM Q Experience
  3. Quantum computing playground
  4. Rigetti’s developer environment for quantum programming — Forest
  5. Qbsolv — A decomposing solver
  6. Jsqubits — Javascript library for quantum computation simulation.

Wikipedia has a list of companies that are working in the field of Quantum Computing or Communication

So what is Quantum Computing?

Quantum computing merges Computer Science and Quantum Physics. As Wikipedia states, Quantum computing is computing using quantum-mechanical phenomena, such as superposition and entanglement.

Traditional computers store information in bits — 1 and 0. Quantum computers, on the other hand, store information in qubits or the quantum bits. Qubits can be in a “superposition” of states in addition to having the two states (“0” or “1”) unlike bits in the conventional computers which can have a value of 0 or 1.

A qubit can be designed in several ways. D-wave systems have built quantum computers based on quantum annealing. Microsoft is building topological quantum computers. Then there are superconducting qubits and spin qubits or more specifically silicon or the flip-flop qubit and so on.

Image Credit: Universe Review

Qubits can be represented using a Bloch Sphere as in the above image. Superposition of qubits gives quantum computers their inherent parallelism. Quantum computers open up a new domain of algorithm design — quantum algorithms. And we can solve some problems much more efficiently using these algorithms. Having said that building a commercial quantum computer has many challenges.

Any commercial quantum computer should have:

  1. Scalable & Stable qubits (Quantum Mechanics at play. Read about Quantum Error Correction to get an idea of the challenges related to scaling and stabilizing).
  2. Control — Interactions between qubits must be controllable. Operation time of quantum gates must be less than decoherence time
  3. Material — Quantum integrated circuits work at cryogenic temperatures so we need a different type of material (as compared to classical circuits) to create them.
  4. Measurability — Accurate processing of qubits between specified locations. Qubits should be easily readable.
  5. Runtime — to run quantum algorithms.
  6. Developer tools — to compile and implement quantum algorithms

As of today, the development of quantum computers is still in its infancy but I am sure we will be able to solve a number of complex real-world problems using quantum computing techniques in the coming decade. Once we move into the era of quantum computing, the world will never be the same.

It’s important to emphasize here that quantum computers will not replace conventional computers. At least, until we can apply quantum computing to solve all problems efficiently.

Key Quantum Computing Concepts

This section needs some knowledge of probability, vector algebra and complex numbers. Before we dive into the key concepts, let’s learn about the notations used to represent different states of qubits.

Dirac Notation (aka bra–ket notation): It is a standard notation for describing quantum states. From Wikipedia:

“The notation begins with using angle brackets, ⟨ and ⟩, and a vertical bar, |, to denote the scalar product of vectors or the action of a linear functional on a vector in a complex vector space”

A Qubit has two base states denoted by notation |0⟩ and |1⟩.

Having learned the notation, let’s now review some of the key concepts that are the foundation of quantum computing.

  1. Superposition: Qubits can be in a superposition of states or mathematically in a linear combination of states, denoted by |ɸ⟩ = α|0⟩ + β|1⟩. α and β are complex numbers and represent amplitudes of the base vectors. When we measure a qubit, we get the state |0⟩ with probability |α|² and the state |1⟩ with probability |β|². Of course ,|α|² + |β|² =1. Feynman proposed that a qubit α|0⟩ + β|1⟩ occupies all the states between 0 and 1 simultaneously, but collapses into 0 or 1 when observed physically.
  2. Entanglement: This quantum effect adds scale to quantum computing. Consider a two-qubit system — it will have 4 base states. As a single entity, the two-qubit system can be in any of the superposition states possible.For quantum computing, we are interested in Bell states, four specific maximally entangled quantum states of two qubits. One such state can be represented by |ɸ⟩ = (|00⟩+|11⟩ )/√2. When we measure the first qubit in this state, there are two possible results; 0 with probability 1/2 leaving the other qubit in the state |00⟩, and 1 with probability 1/2, leaving the other qubit in the state |11⟩. So when measured, the second qubit will always be in the same state as the first qubit! This correlation between the qubits is known as entanglement.
Image Credit: Universe Review

3. Fragility: Quantum states are fragile. A quantum state will collapse to classical state if we try to measure or observe the state or if there is any disturbance.

4. No Cloning: In classical computing, error correction is done by duplicating data. We cannot do the same in quantum computing because of the no -cloning theorem, which states that it’s impossible to create an identical copy of an arbitrary unknown quantum state.

Quantum Gates

Quantum gates are basic building blocks of quantum circuits just like logic gates are basic building blocks of conventional digital circuits. Quantum logic gates are represented by unitary matrices. The most quantum gates operate on spaces of one or two qubits. Here are some examples

Hadamard Gate: Operates on single qubit and is represented by

If we apply Hadamard operator to a qubit that is in a zero state |0⟩, it will end up in a superposition of |0⟩ and |1⟩. Applying the operator twice to a qubit will bring back the qubit to its initial state.

Pauli-X Gate: Operates on a single qubit and is equivalent to NOT gate in classical computing. So it will map |0⟩ to |1⟩ and |1⟩ to |0⟩

Pauli-Y Gate: Operates on a single qubit. It maps |0⟩ to i|1⟩ and |1⟩ to -i|0⟩. This is equivalent to rotation around Y axis of Bloch Sphere by ∏ radians

Pauli-Z Gate: Operates on a single qubit. Keeps base qubit |0⟩ unchanged but maps |1⟩ to -|1⟩. This is equivalent to rotation around Z axis of Bloch Sphere

Controlled (cX cY cZ) gates: Operates on 2 or more qubits. Controlled-NOT gate or CNOT performs the NOT operation on the second qubit only when the first qubit is |1⟩ and is generally used to generate entangled states.

You can learn about more quantum gates from this Wikipedia page.

Quantum Computing Use Cases

Wondering what problems will we solve with a quantum computer?

Quantum computers can be used to solve routing problem for logistics, training neural networks, optimizing asset pricing and hedging, creating protein models, optimizing radiotherapy treatments, detecting computer viruses and network intrusion and so on.

Quantum mechanics will help us solve problems using three types of algorithms: optimization (where we try to find out the best possible path from a set of available paths), sampling problems(selection of a subset of individuals from within a statistical population ) and machine learning(which is based on sampling and optimization).

Final Words

I hope you liked this primer and it helped you gain a basic understanding of quantum computing. If you are interested in checking out some of the quantum algorithms — Quantum teleportation, Grover’s search algorithm, Shor’s factoring and so on, you can review jsqubitsRunner. If you are interested in deep diving into the realm of quantum, I would recommend reading John Watrous’ lecture notes or taking up this course from MIT. If you would like to do hands-on programming, check the links at the start of this story.

About Author

Arpit is a seasoned technologist with vast experience in leading large cross-functional and cross-geography teams. Arpit also consults clients on competitive market analysis, defining MVPs, product ideation, product monetization and go live strategies.

Arpit believes we should all contribute back to society. He has set his goals for social work in five broad areas. You can read more about the same in his blog post “Do Good, Together” on Tumblr. Arpit is interested in working with people who want to contribute towards the same goals.

You can follow Arpit on Linkedin or on Twitter

ABC. Always be clappin’.

--

--