Introducing Projections
Projection operators are used in many parts of mathematics and sciences. They can be used to form the shape of a shadow on a screen, to make a compressed representation of an item in a dataset, to remove noise or interference in signal processing, and even to predict what answer a person will give to a question about someone else's trustworthiness. (More on that below.)
In quantum mechanics, projections play a vital role in modeling measurement. This is because the probability of observing a particle in a particular pure state is determined by the size of the projection from the particle's state vector to the vector representing the pure state. (OK, particles have wavefunctions that are represented by state vectors that get projected onto pure states — that's a lot to take in if it's not familiar! If so, it might be good to read Quantum Behavior by Richard Feynman, and to learn about the Born rule.)
The interactive diagram below helps to understand how projections work. The blue axis is the projection axis, and the red and green circles show where the |0⟩ and |1⟩ basis states end up when projected onto this axis. Try dragging the blue projection axis around the diagram in the dynamic demo. Note the way the red component gets bigger the closer the projection is to the |0⟩ axis, and the green component gets bigger the closer the projection is to the |1⟩ axis.
Simple Mathematical Details
Projection Matrices and Coordinates
The matrix for such a 2-dimensional projection is given by
where θ is the angle between the projection axis and the x
or |0⟩ axis (see figure below).
This is often considered too simple to include in textbooks, but it's worth understanding the derivation. The distance from the origin to the point A
is cos(θ), since this is the adjacent side of the triangle whose hypotenuse is the x-axis from the origin to |0⟩. It follows that the y coordinate of this point (the distance from A to x) is cos(θ)sin(θ) and the x coordinate (the distance from A to y) is cos(θ)cos(θ)=cos2(θ). We can do exactly the same reasoning starting with state |1⟩, and show that the coordinates for the green circle are x=cos(θ)sin(θ) and y=sin2(θ).
Then, since a projection is a linear transformation, we can predict its entire behavior from its action on that set of basis vectors. We know that
so the matrix for the whole operation must be the one written above.
If we make sure to use unit vectors for our axes, then x=cos(θ) and y=sin(θ), so this takes the particularly simple form
This is exactly what the javascript code that runs the dynamic demo implements:
/**
* Returns a shallow copy of the given point, with x and y coordinates
* projected onto the given axis.
*/
function pointProjectedToAxis(point, axis) {
newPoint = Object.assign({}, point);
newPoint.x = axis.x * axis.x * point.x + axis.x * axis.y * point.y;
newPoint.y = axis.x * axis.y * point.x + axis.y * axis.y * point.y;
return newPoint;
}
Probabilities
In the context of quantum computing, these projections have a physical meaning: if a qubit is prepared in the state |0⟩ and the state along the blue axis is measured, the probability of finding the qubit in this state is given by the square of the magnitude of the projection output — that is, the square of the distance from the origin to the red circle. We already noted above that this distance is equal to cos(θ)=x, and so the probability of measuring a 1 output is equal to x2=cos2(θ). Correspondingly, the probability of starting in the |1⟩ state and getting a 1 output is equal to y2=sin2(θ).
If the qubit is prepared instead in the blue state itself (a superposition of the |0⟩ and |1⟩ states), then cos2(θ) and sin2(θ) are respectively also the probabilities of measuring the qubit in the |0⟩ and |1⟩ basis states: these are mutually exclusive events, reflected by the fact that cos2(θ)+sin2(θ)=1.
If you haven't already, try dragging the blue circle and moving the projection axis. Note the way the red circle goes towards the origin when approaching the |1⟩-axis, as does the green circle when approaching the |0⟩-axis. So we go entirely from expecting a |0⟩ result to expecting a |1⟩ by rotating through 90 degrees, or π/2 radians. And if we rotate through 180 degrees, the blue line is back in the same place, and the green and red circles end up back where they started! This is an important fact about projections — if an axis or plane is reversed completely, it performs exactly the same projection operation and thus predicts exactly the same probabilities.
Chaining Together Projections
This gets particularly interesting when we consider a chain of several projections. Try moving the axes around and adding another axis or two to the dynamic demo and see what happens.
It's easy to make pictures like these:
The two situations in this picture are meant to be exactly the same, except that the axes are ordered differently: and this crucial change makes the outcomes quite different too. The order of projections really matters. This is obvious when we look at the pictures, and it's important to emphasize in mathematics. Projections are operators, and operators that can give different answers depending on what order they are applied in are said to be non-commutative.
Intuitively, it's easy to see that the final distance from the origin of the green or red circles doesn't depend on finishing close to where they started: it depends on the jumps all being relatively small. We can use this intuition quite systematically to guide projections around the space. For example, a whole chain of projections can be assembled that gives a particle in the |0⟩ state a high probability of ending up being measured in the |1⟩ state (below left), and with just two such projections set up at exactly 45 degrees from one another, we can give this about a 50-50 chance (below right).
Significance in Quantum Physics
The mathematics above describes what happens in the physical world very directly. A simple demonstration can be made using polaroid filters, which are commonplace in photography for reducing glare. If we arrange two polaroid filters at 90 degrees to one another, they block nearly all light from passing through. But if we add a third filter, instead of just reducing the remaining light even further, sometimes it restores some light instead! This is shown in the video below. The amount of light restored is greatest when the third filter is at an angle half-way between the other two filters, just as in the projection example above.
The explanation is that each filter doesn't just allow through some light and reject the rest — somehow the light that passes through the filter is changed so that its polarization coincides with the filter's. When measuring the polarization of a single photon, or the spin of a single electron, this is exactly what happens. If we measure for spin in an up-down direction, the electron will afterwards be spinning either up or down, not sideways.
The famous Uncertainty Principle is also rooted in this mathematics. Measurements are modeled by projection operators, and we've seen that projections don't commute with one another, so applying P then Q or Q then P will typically give different outcomes. The overall uncertainty when trying to measure P and Q is at least as big as PQ−QP. So the extent to which two observables are compatible depends directly on how much difference is made by changing the order of projections.
Some Differences with Quantum Computing
There are some implementation differences between the sketch given above and what happens in real quantum computers in 2022. These include:
Instead of measuring a qubit along different axes, we normally keep the axis of measurement fixed and rotate the qubit instead.
Quantum measurements are represented by projections, but the crucial quantum gate operations are not. Projections are lossy and irreversible — many points get mapped to the same target. This is a core property of measurement operations, but other quantum operations have to be reversible.
During an ongoing quantum process, it is sometimes harder to guarantee error-free measurement than error-free gate operations. So instead of measuring the same qubit several times and expecting consistent results, we sometimes swap the qubit we want to measure with a different placeholder or "ancilla" qubit in a known state, and measure all the qubits when the gate operations are all complete.
Quantum theory uses complex numbers, so there are more dimensions to think about in practice! In particular, a single qubit doesn't just have a single circle of states it can occupy, but a sphere. This means that there are many in-between 50-50 states that are quite different from |0⟩ and |1⟩ and also quite different from one another.
Caveats aside, though, in 2022, we are regularly running programs that depend on just the concepts above. We expect that several of the above implementation approches will evolve and change within a few years, but the core mathematical description will be just the same.
Significance in Cognitive Science
The order in which we ask questions matters. A famous quantitative example is the Clinton-Gore order experiment. In the 1990's, Bill Clinton was the President of the United States, and Al Gore was the Vice President. For various reasons, Al Gore was perceived in public opinion to be "more trustworthy" than Bill Clinton (see below), but the perceptions of how trustworthy varied depending on whether the two people were considered separately or together. This is discussed from a quantum point of view by authors including Wang and Busemeyer (2013) who describe the results as follows:
In a Gallup poll conducted during September 6–7, 1997, half of the 1,002 respondents were asked the following pair of questions: “Do you generally think Bill Clinton is honest and trustworthy?” and subsequently, the same question about Al Gore. The other half of respondents answered exactly the same questions but in the opposite order. ... The results of the poll exhibited a striking order effect. In the non-comparative context, Clinton received a 50% agreement rate and Gore received 68%, which shows a large gap of 18%. However, in the comparative context, the agreement rate for Clinton increased to 57% while for Gore, it decreased to 60%.
Here the "non-comparative context" means asking "Is X trustworthy?" first, whereas the "comparative context" means after asking "Is Y trustworthy?" just beforehand.
So when asking "Is X trustworthy?" and "Is Y trustworthy?", the order of asking the questions affects the outcomes, just like the projection operators above. Examples like the one to the right have been shown to fit the experimental data accurately using just the projection structures we explored above. See how the final outcome (distance from the origin to the red circle) is larger for both people when the Gore projection is done first.
Why this is Plausible and Non-Classical
These results are not surprising in day to day life. We expect that the order in which information is presented affects the way it is perceived. If you'd decided to ask for a pay rise, you would give your manager good news rather than bad news just beforehand. Much of the art of rhetoric is about preparing the mind of the listener to be receptive to a message.
Perhaps more surprising is order effects aren't part of classical logic or probability. In classical logic, the "Clinton Gore questionnaire" would be modeled by a set a representing the total population, a set representing those who agree that Clinton is trustworthy, a set representing those who agree that Gore is trustworthy, and the group who thinks that both are trustworthy is the intersection of these sets. Whether a subject belongs to one of these sets is unaffected by asking if the subject also belongs to another. Asking a question may cause a system to output an answer, but it doesn't change the system's internal state.
Quantum theory is different. Asking a question causes a change and aligns the system with how the question was asked. As a loose analogy, we can describe this in terms of the colors for our circles above. Let's say that there is an in-between axis representing the color orange, which is quite close to the red |0⟩ axis. In classical theory, "measuring" a red circle in the direction of the orange axis would be asking something like "What are the chances that a red circle would be seen as orange?", the answer to which might be something like "About 80%", but no red circle has been changed. In quantum theory, the question asked is much more like asking each red circle "Hey, are you orange?", and if a red circle says "Yes, I reckon I am", then from that moment on, it is indeed an orange circle.
As a description of the way we as people form opinions and identities, this may sound strikingly familiar! It's well-known that quantum mechanics is historically successful at describing subatomic particles: and now we are learning that quantum theory is also a rich source of models that describe our day-to-day experience.
To learn more about this area, please read our paper on Quantum Circuit Components for Cognitive Decision-Making, with thanks to IonQ's collaborators Jyoti Rani (UC Berkeley) and Emmanuel Pothos (City, University of London).