Quantumania 21 - Slot Machines

A ket is a “regular” vector, from the vector space V, a bra is a covector from the dual space V^* (here I think QM has the upper hand, because almost everything is a vector, so it helps to have a specific term for a “regular” vector.)

A covector f is a black box machine with one slot in the top, and you insert a vector \vec{a}, and out pops a scalar x:

TikZ diagram

It’s linear:

f(\vec{a} + \vec{b}) = f(\vec{a}) + f(\vec{b}) \quad \quad f(x \vec{a}) = x f(\vec{a})

We can add such machines (make a machine with one input slot, and internally it just feeds a copy of that input to two hidden machines and then sums their output scalars to produce the final output). Likewise we can scale a machine. The space of all such possible machines is a vector space V^*. In QM we write such a machine as \bra{f} and have it operate on a vector \ket{a} like this: \braket{f}{a}, and we define a one-to-one mapping between bras and kets. In general, that asterisk notation V^* for the dual space of a space V has nothing to do with complex conjugates. It’s a neat coincidence that the bra-ket mapping in a QM state space involves complex conjugation.

We can also make a machine with two slots, accepting vectors \vec{a} and \vec{b}, but still with one output hole that gives us back a scalar x:

TikZ diagram

Suppose that this two-slot machine had an especially simple inner mechanism: inside the box h there are two single-slot boxes (covectors) f and g. The machinery inserts input \vec{a} into box f, and input \vec{b} into box g, to obtain two scalars, which it simply multiplies together to produce its own resultant scalar that falls out of the hole of h. In other words, it’s really just two covectors glued together by scalar multiplication, and they act independently on the inputs. We can think of the tensor product on the input vectors as gluing them together in a specific order so it’s clear which slot each one is meant to go in:

\bra{h} = \bra{f} \otimes \bra{g} \bra{h} \Big( \ket{a} \otimes \ket{b} \Big) = \Big( \bra{f} \otimes \bra{g} \Big) \Big( \ket{a} \otimes \ket{b} \Big) = \braket{f}{a} \cdot \braket{g}{b}

This is a product machine, it’s behaviour explicable in terms of two separate inner machines. This is not true of all two-slot machines. Once again, these are vectors from a combined vector space, V^* \otimes V^*. We can add a pair of two-slot machines to make another two-slot machine. Thus any two-slot machine might not be separable into two one-slot machines. It may only be expressible as the sum of multiple product machines. Or in QM terms:

\bra{\psi} = \frac{\sqrt{3}}{2} \bra{01} - \frac{1}{2} \bra{10}

The \bra{01} = \bra{0} \otimes \bra{1} and \bra{10} = \bra{1} \otimes \bra{0} are product machines, but their sum is not.

Note that it isn’t necessary to provide both inputs at once. Such a two-slot machine can be given one input, say for the first slot, which clogs up that slot, resulting in what is in effect a one-slot machine. Generalising further, the scalar that falls out after both inputs are provided is, in a sense, a zero-slot machine!

The symmetry of the notation where a bra acts on a ket to produce a scalar, \braket{f}{a}, can just as well be read as the ket acting on the bra; when implemented as a calculation in terms of coordinates, it has the same machinery as the familiar dot product: coordinate-wise multiplication to produce terms in a sum. So you can completely flip the picture around as visualise a ket as a one-slot machine that takes a bra as its input, and the tensor product of two kets as a two-slot machine, and so on.

We can even stitch together a two-slot machine from V \otimes V^*, that is, being defined conceptually through the combining of a ket and a bra (in that order), its inputs need to be a bra and a ket (again, in that order).

Wait a second… this is the shape of a projection operator! The QM notation \ket{a}\bra{b} is itself a shorthand for \ket{a} \otimes \bra{b}. When we write:

\ket{a}\braket{b}{c}

This is the operator \ket{a}\bra{b} acting on the ket \ket{c}, or we can say it’s the ket \ket{c} being inserted into the second slot of the two-slot machine \ket{a} \otimes \bra{b}.

So a term written like this in QM notation:

\ket{1}\bra{0} \otimes \ket{0}\bra{1}

is building a four-slot machine. The two qubits A, B have their own vector spaces V_A, V_B, so the four-slot machine is from the space:

V_A \otimes V_A^* \otimes V_B \otimes V_B^*

Now, given that the slots of these machines are either ket-shaped, expecting to be fed a bra, or bra-shaped and expecting to be fed a ket, its not that far-fetched to suppose that you could connect one of the slots to another! They just need to be slots of the opposite type, from the same dual-space pair, such as V_B and V_B^*, connected by a logical pipe of some kind. This is the so-called partial trace.

Once we adopt this way of thinking, we can completely forget about matrices altogether. There’s really only one bit of notation from classical physics (GR) that we haven’t yet borrowed, and it’s awfully tempting. Cast your mind all the way back up the page to when we wrote our joint state’s density operator as:

\sum_{i,k} \sum_{j,l} \rho_{ij,kl} \ket{i}\bra{k} \otimes \ket{j}\bra{l}

I made a big deal of how I’d written the indices clustered in a certain way to get across how they relate to which system versus bra/ket. There’s already a way to do this properly. The object c holding the coefficients for the 16 possible four-slot machines can be written:

\rho\indices{^i_k^j_l}

The indices are written “up” or “down” to signify the type of object they label, up for a ket and down for a bra. This means we can divide them into rows to separate ket from bra indices, or into columns (albeit slightly staggered) to group by qubit. It’s just a labelled collection of 16 numbers, with no inherent matrix structure. We can slice it however it suits us.

Of course to interpret it properly we need to use each of these coefficients to scale a basis element, and rather than writing \ket{i} \otimes \bra{k} \otimes \ket{j} \otimes \bra{l}, we can represent a basis regular vector (ket) by \vec{e}_i (index down) and a basis covector (bra) by \vec{e}^j (index up). This opposing convention, where a coefficient and its corresponding basis element have oppositely positioned indices, has a purpose, which we’re about to get to.

\rho\indices{^i_k^j_l} \Big( \vec{e}_i \otimes \vec{e}^k \otimes \vec{e}_j \otimes \vec{e}^l \Big)

The final ingredients are the summation symbols, but here we come to what Einstein jokingly called his only contribution to mathematics. In an expression like the above where the same index appears twice, once up and once down, this automatically implies summation over that index. So the above expression is in fact the complete equivalent of our original way of writing it.

We can go a step further and use abstract tensor notation, also known as the slot naming convention. This means we interpret \rho\indices{^i_k^j_l} not as merely a collection of labelled numeric coefficients, but as the full geometric object, the four-slot machine, silently agreeing to imagine that it has the \vec{e}_i \otimes \dots part built into it.

With this understanding, we’re writing the whole density operator for our two-qubit system as:

\rho\indices{^i_k^j_l}

Not only is this remarkably compact, it also means that if we want to “trace out” the second qubit, we just tie together its indices, which sit in the second column, by using the same symbol j for both:

\rho\indices{^i_k^j_j} = (\rho_A)\indices{^i_k}

Because the j index label appears once up and once down, it is summed over, eliminating those two slots, and this is precisely the same thing as the partial trace. We’re left with the density operator for qubit A, \rho_A.

The implied basis vector factor \vec{e}_i \otimes \vec{e}^k \otimes \vec{e}_j \otimes \vec{e}^j, also has the repeated j index, and \vec{e}_j \otimes \vec{e}^j is equivalent to the identity operator, because it is summed over, and each term in the sum contributes a 1 to the diagonal in the matrix representation, so it too disappears, leaving only the implied \vec{e}_i \otimes \vec{e}^k factor, exactly as required.

So a density operator, \rho, can be simplistically viewed as a two-slot machine, where the slots accept a bra and a ket. Why such a pair? Together they represent an input that accepts a density operator.

So in the usual QM notation, we can write:

x = \bra{\phi} \rho \ket{\psi}

and x is a scalar. Why the sandwich? Because the QM notation pays tribute to the pattern of matrix multiplication and the pieces have to be written in that order for such a multiplication to work. If we instead used explicit index notation:

x = \rho\indices{^j_k} \phi_j \psi^k

then we could write the factors in any order. The pairing of the indices describes a topological “wiring up” between connection points. Interpreting the factors as labelled coefficients, they are just numbers being multiplied, so clearly the order is unimportant. What matters is which combinations are multiplied and then summed. The result x is still a scalar, because of the implied summation.

To supply a density operator to the slots is to ask a question. If we supply \ket{\phi}\bra{\phi}, that’s a simple projection operator representing a specific state, and the question is: “What’s the probability that the system is in this state?” and x is the answer.

The deeper point is that this two-slot case, while a valid way to describe any complex system, is a simplification if we are interested in the subsystems that comprise that complex system. Each subsystem can be thought of as having its own bra-ket pair of slots, and we can eliminate one subsystem by tying its slots together.

These two viewpoints are perfectly compatible because the tensor product allows us to connect the state spaces of any group of subsystems together into one state space. We can group them into a hierarchy, deal with them individually or all at once. If our system contains 10 qubits, we can divide them into three registers of 2, 3 and 5 qubits each, each register exposing two slots. It’s vital to remember that they might not be three independent machines: their behaviour maybe correlated by entanglement.




    Not yet regretting the time you've spent here?

    Keep reading:

  • Quantumania 20 - Disentanglement
  • Quantumania 19 - Disappear With Trace
  • Quantumania 18 - Mixed Messages
  • Quantumania 17 - More Function, More Mystery
  • Quantumania 16 - Diagonal = Easy