# Quantum Quixote

quivalric qomic

## Posts

(abbreviations: Q for Quantum; QC for Quantum Computer/Computing/Computation)

### Artificial Intelligence and Quantum Computation

Crossref to QuTech blog post:

### QC Resources

(Created Jun 21, 2020; Updated Sep 26, 2021)

There are some great resources available over the internet. The first stop, in my opinion, should be the Awesome Quantum Computing GitHub page. Other good meta-resources are Quantum Computing Report, Quantum Computing Stack Exchange and Quantiki.

Some of my recommendations for beginners:

- Quantum Computers Explained – Limits of Human Technology
- Five Quantum Computing Misconceptions
- The high-stakes race to make quantum computers work - Chiara Decaroli
- Quantum Computing Expert Explains One Concept in 5 Levels of Difficulty - WIRED
- Computing a Universe Simulation

Some of my recommendations for recorded talks:

- Quantum Machine Learning and PennyLane by Maria Schuld
- The Potential Impact of Quantum Computers on Society by Ronald de Wolf
- Quantum Computing: From Qubits to Quantum Accelerators by Koen Bertels
- Quantum Algorithms Landscape by Adam Bouland
- Variational Quantum Machine Learning by Jacob Biamonte
- Computational Complexity Theory and Quantum Computers by Scott Aaronson
- Quantum Quandam Quantum Futurum by Seth Lloyd

Quantum events:

Quantum computing platforms:

- Quantum Inspire
- Quirk
- Quantum Programming Studio
- Quantum IDE
- Quantum-Kit
- Phase Space Computing
- QC Ware Forge
- Quantum JavaScript

### Q Mythbusters

#### DeHyping Quantum

List of resources presenting a realist view of the current challenges of quantum computing:

- 2008 - The Limits of Quantum Computers
- 2015 - Read the Fine Print
- 2020 - The bitter truth about gate-based quantum algorithms in the NISQ era
- 2021 - Quantum Computing: From NISQ to PISQ
- 2021 - Focus beyond Quadratic Speedups for Error-Corrected Quantum Advantage
- 2023 - Where are we heading with NISQ?
- 2023 - What will a quantum computer be good for, exactly?
- 2023 - Disentangling Hype from Practicality: On Realistically Achieving Quantum Advantage

#### 200 qubits can map to all the atoms in the Universe

(Jul 9, 2020)

Well, no.

So, where does this claim come from?

The basis of this is the Eddington number, estimating the number of protons in the observable universe. Of course, this is with assumptions like all matter can be taken to be hydrogen and estimates of the number and sizes of galaxies and stars in the universe.

The number of elementary particles of matter is roughly 2^{200}. The total information (including other informational carriers like photons, neutrinos, black holes) is still below the 10^{120} Bekenstein bound of our Universe’s volume (more on that in a separate post later).

By the way, 2^{200} equals ~10^{80}. Not that it helps in wrapping our heads around the trail of zeros in the decimal version.

The exponent in base-2 (binary) helps when we compare computing powers.

Now coming to quantum computing using qubits (yes, you can use qutrits, or qudits too), each qubit can be in a superposition of 0 or 1. That means 200 qubits have 2^{200} basis states that can be in a superposition. You can encode a complex amplitude for each of those states.

But what can you do with 200 qubits? You can encode 2^{200} classical states and run some algorithms. This is indeed the power of quantum computation when you are processing classical data, like in optimization or machine learning. Again, assuming the algorithm design does the heavy lifting of interfering with the superpositions such that on measuring, you get the 200 bits dictated by the Holevo’s bound, corresponding to the answer (e.g., the optimal assignment).

Now to physical simulation of quantum states, a.k.a. Feynman’s use-cases of quantum computing. You can simulate two quantum particle’s quantum degrees of freedom with, well, two qubits. Not with 2 bits. You would need 2^{2} complex numbers for that. This is where quantum shines in molecular simulations. However, the 2^{200} from the Eddington number were the number of quantum particles in the universe. To quantumly simulate that, we need a quantum computer memory of, well, 2^{200} qubits. To classically simulate that, we would need (2^{200})^{200} bits.

Coming to the Mythbuster, this correlation in the cardinality of the number of basis states in 2^{200} qubits and the number of atoms in the Universe should be taken in the same spirit as 1 person’s total DNA in all cells could stretch to the sun and back 61 times. That doesn’t say much about the power of quantum computation except just dilate your retina on the incomprehensibility of the powers of 2. This has nothing to do with the Quantum Supremacy limit that I will discuss soon.

#### Quantum supremacy

(coming soon)

### IN Quantum

(Created Mar 1, 2022)

A list of links regarding quantum (especially, computing) activities in India. This will eventually help contribute to QIndia’s efforts.

Academic research groups:

- PRL Ahmedabad
- IISc Bengaluru
- RRI Bengaluru
- IIIT Delhi
- IIIT Hyderabad
- IISER Kolkata
- IIT Madras
- IISER Mohali
- TIFR Mumbai
- JIIT Noida
- HRI Prayagraj
- QuEST
- BITS Goa

Organizations / Associations:

Industrial groups:

- QPi
- QNu
- IBM
- TCS Research and Innovation
- LTIMindtree
- TCG Crest
- QRD Labs

Academic programs:

- tbd

### Career in QC - a guide for highschoolers

(Jul 8, 2020)

The answer to the ultimate question of life, the universe, and everything might not be as simple as 42. Rather, a more intriguing inquiry that fascinates scientists is, can a sentient computer like the ones we find in Sci-Fi stories and movies be built? What questions can it answer once it is built? What are the fundamental limits we come across while building increasingly powerful computers?

What is this cool gadget? What can you do with it? Where can you find one? How to use it? Read on.

##### “…the coolest gadget…”

The computer revolution has been immensely successful. From the internet explosion to DotA playing bots; from mobile phones to Martian rovers - it has transformed almost every aspect of human life.

Unfortunately, this steam-rolling advancement of the digital age will soon face a major roadblock – the boss fight with the fundamental laws of physics.

To explain this in brief, this huge advancement in digital applications was sanctioned by the growth of processing power, which in turn was possible due to the miniaturization of the electronic circuit elements (called Moore’s law of transistor scaling). The limit where these circuits are single-atom-wide is within sight. You can’t manufacture it any smaller, ramifying its effect as a standstill in processing power and thereby of the thriving global economy based on upgrading computing devices.

Major computing corporations (like IBM, Google, Microsoft, and Intel) place their bets on a fundamentally different way of computing – quantum computing. In this paradigm, instead of being restricted by the strange properties that arise in the single-atom-width domain that deters making faster computers, these properties are used to perform the calculations itself.

Surprisingly, these quantum methods are theoretically much more powerful than normal (classical) computers based on binary switching logic of 0s and 1s.

There’s a catch. Nature seems to hide this powerful device very well with its laws. This form of computation is only possible if these small particles (called qubits) are secluded from any outside disturbances and influences, like energy from heat and magnetic field or the programmer trying to glimpse how much of the computation has it completed.

Thus, these computers are shelved in 2-floor tall refrigerators that are cooled to almost 0 kelvin (colder than outer space). These literally are the ‘coolest’ computers out there!

This fragility makes them very costly to build and maintain. Well, at least for now.

What would you use such an immensely powerful computer for? Of course, it should be able to do everything your laptop PC can. You can play games on it if you want. But that will be like using your PC to calculate 7*13. You can as well do it on your handheld calculator at the same speed if not faster, as they are simpler, and specialized to do such calculations. Similarly, most of what you use your laptops for is too easy a task for a quantum computer; it is not worth the trouble of building such a costly gadget. Instead, a powerful gadget like that better fits the pursuit to tackle the more notorious problems that we deal with – in mathematics, physics, chemistry, biology, economics, etc. So hold on to your laptop for playing your favorite game just yet (or possibly for a very long time).

You might always be on the lookout for the latest graphics card in the market to allow you to play the latest game. Graphics cards or GPUs (graphics processing units) are different from the generic CPUs running the OS in that they are specialized electronics (called accelerators) designed with the purpose of speeding up graphical calculations. The CPU takes the help of the GPU every time it is tasked with heavy graphics processing.

In the foreseeable future, quantum computers (QC) will be another accelerator like the GPU, to which the CPU will offload specific tasks that are beyond the league of classical computation.

De-hype alert: while quantum computers are the most powerful gadget we can imagine with our current theories of computation and physics, there are many questions that remain tough (at times impossible) even for a QC – and perhaps for any computation process (e.g., predicting the next coin flip result).

##### “…there is?”

Why don’t scientists already use a QC to solve all the difficult problems of the world and liberate mankind?

Well, the short answer is, we don’t have a good quantum computer yet.

It is a field that is still maturing and started the engineering efforts only about a decade back. In comparison, our present computers have enjoyed a development time of over half a century.

To make a perfect QC, it must be absolutely isolated from any environment, which is incredibly difficult. As a bargain, we now have Noisy-Intermediate-Scale Quantum (NISQ) devices. These are gadgets that can perform limited calculations using the secret recipe but may not be powerful enough to dethrone their classical competitors.

Nevertheless, there is a group of experimentalists who are exploring the usefulness of NISQ devices. They use the quantum computing stack (check out this infographic from the Delft University of Technology) where a high-level algorithmic logic for the application gets transformed to precise electrical control pulses that are sent to the quantum computer housed in the refrigerator. Building each layer requires different expertise.

##### “…can you tinker with…”

The good news is, these NISQ devices are already available as cloud computing services. And you can run your calculation on them for free! IBM, Intel and D-Wave offer some of their devices for experimentation while others require paid subscriptions.

They are programmed differently though. To tinker with them, be sure to spend some time first on the tutorials of these webpages.

##### “How soon…”

How long before these gadgets become computing behemoths? Scientists are optimistic. In the 10-15 year timeline, the power of QC for certain specialized tasks will reign supreme. The most promising advantage would be in optimization tasks, molecular simulations, and cryptography. There are lot of work to be done to progress in this field.

The timeline fits perfectly if you are a high-schooler or in your undergrad. It takes training to develop the background and intuition. It’s one thing to study counter-intuitive quantum phenomena to pass your physics examinations; it’s another thing to master wielding these incredibly powerful weapons against real-world problems.

Hardware developers need to unravel how to scale up quantum computers and make them less erroneous. Training in experimental physics, micro-electronics are computer engineering is helpful. QC is costly to build in a garage. Most work in academic labs or MNCs with lots of funding, closely guarding their secret techniques for making such a device.

On the other hand, many individuals and startup companies are thinking about real-world applications. The theoretical field of quantum computation is much mature, but in those days, there was no drive to test the algorithms on a real device.

The new generation of quantum programmers is more aware of the developments of quantum hardware balancing implementation feasibility with usefulness. Quantum programming demands a mix of domain knowledge (say, of the stock market for financial modeling), theoretical computer science, linear algebra, and some basic quantum mechanics.

The cherry on the cake is that a host of programming platforms and tutorials are freely available. So, grab your laptop and start learning the basics. It is never too early to start!

Back to the question:

*How soon can you tinker with the coolest gadget there is?*

*You already can. Buckle-up to train in the ways of its magic. The world awaits the quantum wizard in you.*

### Q Programming Languages

(Jun 21, 2020)

The first question a quantum software/application developer faces is, which programming platform to use. Especially with the large number of choices already available, this becomes difficult to choose.

If you plan to develop few-qubit programs and eventually test the implementation on an available physical chip, then choose the toolset from the corresponding provides, e.g. Qiskit for IBM, Forest for Rigetti. Beware, developing a ‘realistic’ application is difficult due to the limitation in quantum volume.

If you are interested in the computation logic and remain hardware agnostic, choose a platform that offers more simulation capabilities. The larger the unitary matrix (i.e. number of qubits) you are allowed, the better you can test the logic. Often access to the internal state vector and execution capabilities on HPC systems are useful. Available algorithmic primitives, ease of expressing logic at a high level, and analytic tools like metrics and visualizations are also desirable. Do not worry too much about not choosing the mainstream most popular one as cross-compilers between the dominant tools will soon be a norm. Beware, developing a ‘realistic’ application is difficult due to limitations in quantum computer simulation using classical logic.

### Universal Gate Set

(Jun 21, 2020)

What is computation? It is a set of inputs I={i1,i2,…,in} getting transformed to a set of outputs O={o1,o2,…,om}. Now, for the processing part, let us process one output at a time, as is the convention in simple single-threaded single-core processors. Each output variable is defined by a map from the set of input variables. The exhaustive possibilities for each input variable and the corresponding expected output are represented in a truth table. From a black box model, the processing logic is expected to implement this truth table’s epistemological behavior. It can as well maintain a huge look-up table and search for the entry corresponding to a specific input case and produce the output.

To derive the logic behind the truth table, we transform it into a sum-of-product form. This transformation is very powerful, as we use only 3 logical operators to form this expression - AND, OR, NOT. Since AND and OR are associative, if our processor supports the primitives of a 2-variable AND, 2-variable OR, and NOT, we have a universal set for any computation. With these tools at hand, we do not need to design different logic gates for each truth table, we just need to wire up many AND, OR, NOT gates in a circuit. These are like the protons, neutrons, and electrons of the computer world.

The NAND and NOR gates are also universal on their own. NOT(i) = NAND(i,i); AND(i1,i2) = NAND(NAND(i1,i2),NAND(i1,i2)); OR(i1,i2) = NAND(NAND(i1,i1),NAND(i2,i2)). Isn’t this great? With just one 2-input truth table, all other truth tables can be formed.

Similarly for quantum computation, there are also universal sets. A common one is formed from the 3 quantum gates of CNOT, H, and T. A quantum computation is represented by a unitary transform of the input state to the output state. This arbitrary unitary is like a truth table, that can be decomposed into simpler building blocks of smaller quantum gates. My favorite universal set is Toffoli and H. The Toffoli gate (CCNOT) is universal for classical computation, as it can implement NAND and FanOut. While the Hadamard gate is native to quantum, giving rise to superpositions. I often find, that most quantum algorithms I implement rely on these gates by intuition. Also, the matrix forms of these gates have no complex elements making them easy to implement on simulators.

One important point often overlooked is that by choosing to implement a general function by a universal set, we lose some performance. If we design special-purpose hardware to support a specific data transform, it will most likely be more optimal than doing so with the blocks from a universal set, similar to how ASICs are faster than CPUs.

### Quantum Quixote

(Mar 24, 2019)

There is already a Quantum Pontiff, Quantum Sheikh and Quantum Pundit. Hey, I am a Hindu by birth, and pundit is already taken! Also, I am so confused - am I an atheist or an agnostic? Duh! It is not about your real faith…. do I believe in a single way of doing computation, a single enterprise taking over, a single physical platform…. no! But also, when it comes to quantum, I am not an atheist like Gil Kalai. Rather the opposite. I like to dream big - even unrealistic, quixotic. And that has set me on a course through the stormy waters on my own adventure: The Ingenious Gentleman Sir Quan’ Quixote of Delft.