# If all quantum gates must be unitary, what about measurement?

All quantum operations must be unitary to allow reversibility, but what about measurement? Measurement can be represented as a matrix, and that matrix is applied to qubits, so that seems equivalent to the operation of a quantum gate. That's definitively not reversible. Are there any situations where non-unitary gates might be allowed?

Unitary operations are only a special case of quantum operations, which are linear, completely positive maps ("channels") that map density operators to density operators. This becomes obvious in the Kraus-representation of the channel, $$\Phi(\rho)=\sum_{i=1}^n K_i \rho K_i^\dagger,$$ where the so-called Kraus operators $K_i$ fulfill $\sum_{i=1}^n K_i^\dagger K_i\leq \mathbb{I}$ (notation). Often one considers only trace-preserving quantum operations, for which equality in the previous inequality holds. If additionally there is only one Kraus operator (so $n=1$), then we see that the quantum operation is unitary.

However, quantum gates are unitary, because they are implemented via the action of a Hamiltonian for a specific time, which gives a unitary time evolution according to the Schrödinger equation.

• +1 Everyone interested in quantum mechanics (not just quantum information) should know about quantum operations e.g. from Nielsen and Chuang. I think it is worth mentioning (since the Wikipedia page on Stinespring dilation is too technical) that every finite-dimensional quantum operation is mathematically equivalent to some unitary operation in a larger Hilbert space followed by a restriction to the subsystem (by the partial trace). – Ninnat Dangniam Mar 20 '18 at 5:31
• I've downvoted this because it refers to a concept which is arguably more advanced than the perspective from which the original question is being asked. – Alexander Soare May 21 '20 at 11:55

Quantum operations do not need to be unitary. In fact, many quantum algorithms and protocols make use of non-unitarity.

Measurements are arguably the most obvious example of non-unitary transitions being a fundamental component of algorithms (in the sense that a "measurement" is equivalent to sampling from the probability distribution obtained after the decoherence operation $$\sum_k c_k\lvert k\rangle\mapsto\sum_k |c_k|^2\lvert k\rangle\langle k\rvert$$).

More generally, any quantum algorithm that involves probabilistic steps requires non-unitary operations. A notable example that comes to mind is HHL09's algorithm to solve linear systems of equations (see 0811.3171). A crucial step in this algorithm is the mapping $$|\lambda_j\rangle\mapsto C\lambda_j^{-1}|\lambda_j\rangle$$, where $$|\lambda_j\rangle$$ are eigenvectors of some operator. This mapping is necessarily probabilistic and therefore non-unitary.

Any algorithm or protocol that makes use of (classical) feed-forward is also making use of non-unitary operations. This is the whole of one-way quantum computation protocols (which, as the name suggests, require non-reversible operations).

The most notable schemes for optical quantum computation with single photons also require measurements and sometimes post-selection to entangle the states of different photons. For example, the KLM protocol produces probabilistic gates, which are therefore at least partly non-reversible. A nice review on the topic is quant-ph/0512071.

Less intuitive examples are provided by dissipation-induced quantum state engineering (e.g. 1402.0529 or srep10656). In these protocols, one uses an open map dissipative dynamic, and engineers the interaction of the state with the environment in such a way that that the long-time stationary state of the system is the desired one.

At risk of going off-topic from quantum computing and into physics, I'll answer what I think is a relevant subquestion of this topic, and use it to inform the discussion of unitary gates in quantum computing.

The question here is: Why do we want unitarity in quantum gates?

The less specific answer is as above, it gives us 'reversibility', or as physicists often talk about it, a type of symmetry for the system. I'm taking a course in quantum mechanics right now, and the way unitary gates cropped up in that course was motivated by the desire to have physical transformations $\hat{U}$: that act as symmetries. This imposed two conditions on the transformation $\hat{U}$:

1. The transformations should act linearly on the state (this is what gives us a matrix representation).
2. The transformations should preserve probability, or more specifically inner product. This means that if we define:

$$|\psi '\rangle = U |\psi\rangle, |\phi'\rangle = U |\phi\rangle$$

Preservation of inner product means that $\langle \phi | | \psi \rangle= \langle \phi' | | \psi'\rangle$. From this second specification, unitarity can be derived (for full details see Dr. van Raamsdonk's notes here).

So this answers the question of why operations that keep things "reversible" have to be unitary.

The question of why measurement itself is not unitary is more related to quantum computation. A measurement is a projection on to a basis; in essence, it must "answer" with one or more basis states as the state itself. It also leaves the state in a way that is consistent with the "answer" to the measurement, and not consistent with the underlying probabilities that the state began with. So the operation satisfies specification 1. of our transformation $U$, but definitively does not satisfy specification 2. Not all matrices are created equal!

To round things back to quantum computation, the fact that measurements are destructive and projective (ie. we can only reconstruct the superposition through repeated measurements of identical states, and every measurement only gives us a 0/1 answer), is part of what makes the separation between quantum computing and regular computing subtle (and part of why it's difficult to pin that down). One might assume quantum computing is more powerful because of the mere size of the Hilbert space, with all those state superpositions available to us. But our ability to extract that information is heavily limited.

As far as I understand it this shows that for information storage purposes, a qubit is only as good as a regular bit, and no better. But we can be clever in quantum computation with the way that information is traded around, because of the underlying linear-algebraic structure.

• I find the last paragraph a bit cryptic. What do you mean by "slippery" separation here? It is also non-obvious how the fact that measurements are destructive implies something about such separation. Could you clarify these points? – glS Mar 15 '18 at 20:05
• @glS, good point, that was worded poorly. Does this help? I don't think I'm saying anything particularly deep, simply that Hilbert space size alone isn't a priori what makes quantum computation powerful (and it doesn't give us any information storage advantages) – Emily Tyhurst Mar 15 '18 at 20:41

There are several misconceptions here, most of them originate from exposure to only the pure state formalism of quantum mechanics, so let's address them one by one:

1. All quantum operations must be unitary to allow reversibility, but what about measurement?

This is false. In general, the states of a quantum system are not just vectors in a Hilbert space $\mathcal{H}$ but density matrices $-$ unit-trace, positive semidefinite operators acting on the Hilbert space $\mathcal{H}$ i.e., $\rho: \mathcal{H} \rightarrow \mathcal{H}$, $Tr(\rho) = 1$, and $\rho \geq 0$ (Note that the pure state vectors are not vectors in the Hilbert space but rays in a complex projective space; for a qubit this amounts to the Hilbert space being $\mathbb{C}P^1$ and not $\mathbb{C}^2$). Density matrices are used to describe a statistical ensemble of quantum states.

The density matrix is called pure if $\rho^2 = \rho$ and mixed if $\rho^2 < \rho$. Once we are dealing with a pure state density matrix (that is, there's no statistical uncertainty involved), since $\rho^2 = \rho$, the density matrix is actually a projection operator and one can find a $|\psi\rangle \in \mathcal{H}$ such that $\rho = |\psi\rangle \langle\psi|$.

The most general quantum operation is a CP-map (completely positive map), i.e., $\Phi: L(\mathcal{H}) \rightarrow L(\mathcal{H})$ such that $$\Phi(\rho) = \sum_i K_i \rho K_i^\dagger; \sum_i K_i^\dagger K_i \leq \mathbb{I}$$ (if $\sum_i K_i^\dagger K_i = \mathbb{I}$ then these are called CPTP (completely positive and trace-preserving) map or a quantum channel) where the $\{K_i\}$ are called Kraus operators.

Now, coming to the OP's claim that all quantum operations are unitary to allow reversibility -- this is just not true. The unitarity of time evolution operator ($e^{-iHt/\hbar}$) in quantum mechanics (for closed system quantum evolution) is simply a consequence of the Schrödinger equation.

However, when we consider density matrices, the most general evolution is a CP-map (or CPTP for a closed system to preserve the trace and hence the probability).

1. Are there any situations where non-unitary gates might be allowed?

Yes. An important example that comes to mind is open quantum systems where Kraus operators (which are not unitary) are the "gates" with which the system evolves.

Note that if there is only a single Kraus operator then, $\sum_i K_i^\dagger K_i = \mathbb{I}$. But there's only one $i$, therefore, we have, $K^\dagger K = \mathbb{I}$ or, $K$ is unitary. So the system evolves as $\rho \rightarrow U \rho U^\dagger$ (which is the standard evolution that you may have seen before). However, in general, there are several Kraus operators and therefore the evolution is non-unitary.

Coming to the final point:

1. Measurement can be represented as a matrix, and that matrix is applied to qubits, so that seems equivalent to the operation of a quantum gate. That's definitively not reversible.

In standard quantum mechanics (with wavefunctions etc.), the system's evolution is composed of two parts $-$ a smooth unitary evolution under the system's Hamiltonian and then a sudden quantum jump when a measurement is made $-$ also known as wavefunction collapse. Wavefunction collapses are described as some projection operator say $|\phi\rangle \langle\phi|$ acting on the quantum state $|\psi\rangle$ and the $|\langle\phi|\psi\rangle|^2$ gives us the probability of finding the system in the state $|\phi\rangle$ after the measurement. Since the measurement operator is after all a projector (or as the OP suggests, a matrix), shouldn't it be linear and physically similar to the unitary evolution (also happening via a matrix). This is an interesting question and in my opinion, difficult to answer physically. However, I can shed some light on this mathematically.

If we are working in the modern formalism, then measurements are given by POVM elements; Hermitian positive semidefinite operators, $\{M_{i}\}$ on a Hilbert space $\mathcal{H}$ that sum to the identity operator (on the Hilbert space) $\sum _{{i=1}}^{n}M_{i}=\mathbb{I}$. Therefore, a measurement takes the form $$\rho \rightarrow \frac{E_i \rho E_i^\dagger}{\text{Tr}(E_i \rho E_i^\dagger)}, \text{ where } M_i = E_i^\dagger E_i.$$

The $\text{Tr}(E_i \rho E_i^\dagger) =: p_i$ is the probability of the measurement outcome being $M_i$ and is used to renormalize the state to unit trace. Note that the numerator, $\rho \rightarrow E_i \rho E_i^\dagger$ is a linear operation, but the probabilistic dependence on $p_i$ is what brings in the non-linearity or irreversibility.

Edit 1: You might also be interested Stinespring dilation theorem which gives you an isomorphism between a CPTP map and a unitary operation on a larger Hilbert space followed by partial tracing the (tensored) Hilbert space (see 1, 2).

Measurement is usually taken as a postulate of quantum mechanics. There's usually some preceding postulates about hilbert spaces, but following that

• Every measurable physical quantity $A$ is described by an operator $\hat{A}$ acting on a Hilbert space $\mathcal{H}$. This operator is called an observable, and it's eigenvalues are the possibly outcomes of a measurement.
• If a measurement is made of the observable $A$, in the state of the system $\psi$, and the outcome is $a_n$, then the state of the system immediately after measurement is $$\frac{\hat{P}_n|\psi\rangle}{\|\hat{P}_n|\psi\rangle\|},$$ where $\hat{P}_n$ is the projector onto the eigen-subspace of the eigenvalue $a_n$.

Normally the projection operators themselves should satisfy $\hat{P}^\dagger=\hat{P}$ and $\hat{P}^2=\hat{P}$, which means they themselves are observables by the above postulates, and their eigenvalues $1$ or $0$. Supposing we take one of the $\hat{P}_n$ above, we can interpret the $1,0$ eigenvalues as a binary yes/no answer to whether the observable quantity $a_n$ is available as an outcome of measurement of the state $|\psi\rangle$.

Measurements are unitary operations, too, you just don't see it: A measurement is equivalent to some complicated (quantum) operation that acts not just on the system but also on its environment. If one were to model everything as a quantum system (including the environment), one would have unitary operations all the way.

However, usually there is little point in this because we usually don't know the exact action on the environment and typically don't care. If we consider only the system, then the result is the well-known collapse of the wave function, which is indeed a non-unitary operation.

Quantum states can change in two ways: 1. quantumly, 2. classically.

1. All the state changes taking place quantumly, are unitary. All the quantum gates, quantum errors, etc., are quantum changes.

2. There is no obligation on classical changes to be unitary, e.g. measurement is a classical change.

All the more reason, why it is said that the quantum state is 'disturbed' once it's measured.

• Why would errors be "quantum"? – Norbert Schuch Oct 28 '18 at 22:20
• @NorbertSchuch: Some errors could come in the form of the environment "measuring" the state, which could be considered classical in the language of this user, but other errors may come in the form of rotations/transformations in the Bloch sphere which don't make sense classically. Certainly you need to do full quantum dynamics if you want to model decoherence exactly (non-Markovian and non-perturbative ideally, but even Markovian master equations are quantum). – user1271772 Oct 29 '18 at 1:05
• Surely not all errors are 'quantum', but I meant to say that all 'quantum errors' ($\sigma_x,\sigma_y,\sigma_z$ and their linear combinations) are unitary. Please correct me if I am wrong, thanks. – alphaQuant Oct 29 '18 at 5:49
• To be more precise, errors which are taken care of by QECCs. – alphaQuant Oct 29 '18 at 5:56
• I guess I'm not sure what "quantum" and "classical" means. What would a CP map qualify as? – Norbert Schuch Oct 29 '18 at 6:45