Wednesday, May 3, 2023

A Superposition of Errors

For a really long time, I've been trying to construct a simple explanation of Quantum Mechanics (QM) that could be understood without a background in the math used in the formal studies of the subject. I hope to eventually do that but there are several subtopics. I'm not sure which to tackle first and I keep getting stuck.

Recently I came across a science blogger's article about quantum computing that said:

Qubits exploit the quantum phenomenon of superposition, the ability for a particle to be in more than one state at once. A qubit can therefore be in any state between 0 and 1 inclusive, and in fact can be in every state from 0 to 1 at the same time.

Yes, Qubits exploit superposition. Essentially every other part of this is wrong. Superposition is not a quantum phenomenon. A qubit is not in more than one state at a time, it is a state formed by a superposition of other states. There are no states between 0 and 1, so a qubit cannot be in a state between zero and one. The assertion that it is "in every state from 0 to 1 at the same time" isn't even wrong.

So, thanks to this "incentive" I'll address superposition.

Superposition is a general property of an enormous category of mathematical relationships. One set of those is used in QM but it is not a "quantum phenomenon".

To explain the rest of these errors I need to explain a bit about superposition.

I'll use light waves as an example. As I hope everyone reading this knows, light is an electromagnetic wave. One particularly simple and useful way to view a light wave is that it has its electric field value changing like a sine wave in a single direction. Light like this is said to be polarized in that direction. 

A particular electromagnetic wave can be polarized in the vertical direction. Another possible wave is one that is polarized horizontally. Electromagnetic waves are in the category of mathematics that support superposition. This means that the sum of any solutions to the relevant equations are also solutions. So we can add the horizontal and vertical waves and the results will also be a valid electromagnetic wave. I chose these options because adding combinations, also known as forming a superposition, of vertical and horizontal waves results in an electromagnetic wave at any possible angle. (For those that aren't spooked by trig functions to set the polarization angle to θ from the vertical component is cos(θ) and the horizontal is sin(θ).) Any linearly polarized light wave can be constructed from a superposition of horizontally and vertically polarized waves. Light that is polarized at some angle to the direction in which the polarization is being measured is not in more than one polarization state at a time. It is a distinct polarization state that is formed by the superposition of other states. 

If we consider light as a series of photons we start to see some of the effects of QM. A photon of light is an all-or-nothing sort of thing. If the photon encounters a polarizing filter it either goes through it or it doesn't. The proportion of photons that will go through is related to the amount of horizontal and vertical polarization in the superposition. Each photon either passes through the filter or it doesn't. There are only two states possible, the photon has an intrinsic "two-valueness".

(The above treatment of polarized light ignores several very important aspects of the topic, like circular polarization and polarization measurements at arbitrary angles. These don't have any relevance to the topic of this entry, and they don't relate to the general topic of superposition in quantum computers.)

This superposition is, mathematically, the same as superposition in the context of quantum computers.

Many quantum mechanical systems can only be in discrete states. Let's consider the (so-called) spin of an electron. The spin, or angular momentum, of a regular object is a vector whose direction is the axis of rotation and whose magnitude depends on the distribution of mass and the rate of rotation. For an electron, the spin behaves in a way that has no classical analog. No matter how the electrons are aligned and no matter what axis the spin is measured along the result is always the same magnitude, either with or opposite that measurement axis. Explaining what this means and why it's so weird is far beyond the scope is this rant. This "two-valueness" is true for all qubits, not just the ones that can be reduced to electrons.

So, how should that article have described qubits? Here's a possibility.

Qubit is a portmanteau of quantum and bit. Qubits take advantage of superposition, a fundamental property of quantum systems that can make any combination of states a possible state. Qubits, like regular bits, have two states, usually called 0 and 1. Superposition allows qubits to be in other states, ones that aren't possible with regular bits, where the value is both 0 and 1 at the same time. When combined with another quantum behavior, entanglement, this greatly increases the amount of information that can be encoded in a set of qubits.