# Controlled-measurement of a quantum register

Given a state vector $\left[\alpha,\beta,\gamma,\delta\right]$ which is not known a priori, does there exist an operation, which I will call "controlled-measurement", which results in the ensemble

$\left[\alpha,\sqrt{|\beta|^2+|\delta|^2},\gamma,0\right]$

with probability ${|\beta|^2}\over{|\beta|^2+|\delta|^2}$ and

$\left[\alpha,0,\gamma,\sqrt{|\beta|^2+|\delta|^2}\right]$

with probability ${|\delta|^2}\over{|\beta|^2+|\delta|^2}$, and informs me in which of these two states is the system now? (Assume that the phase of the roots is inconsequential.)

Failing this, does there exist an operation, which I will call "controlled-initialization", which operates on the same unknown state vector but deterministically results in the first case of the above ensemble? If not, what law of quantum mechanics is violated by this operation?

If either operation is impossible, what law of quantum mechanics precludes it?

-
hope, you may find the answer in: physics.stackexchange.com/questions/26869/… – user2612 Jan 16 '13 at 10:22
That question pertains to the intersection of control theory and quantum mechanics. My question does not concern control theory (a branch of mathematics), but rather controlled gates (a concept in quantum computation). – Chris Pacejo Jan 16 '13 at 18:35
Even with the controlled-initialization clarification, you're still not being completely clear about what you want. What happens if you input $[1/2,-\sqrt{1/2},1/2,0]$? Do you want to get rid of the square root? (Now you're effectively trying to turn a mixture into a superposition, which is impossible.) Keep the square root? (Now, you run into problems involving what happens to the state $[1/2,1/2,1/2,-1/2]$.) – Peter Shor Jan 17 '13 at 14:20
I edited the last paragraph to generalize it for any 2-qubit state (though I left the resultant phase of the square root unspecified; what it is is inconsequential for my use). Your first example would remain unchanged (i.e. keep the square root). Your second example would become $\left[1/2,\sqrt{1/2},1/2,0\right]$, though it's not clear to me what the phase of the second entry ($\left|01\right>$) "should" be. – Chris Pacejo Jan 17 '13 at 15:04

Neither your notion of controlled measurement, nor your notion of controlled initialisation, are valid quantum operations. In the two cases, I don't think that there is a simple, single axiom of quantum mechanics that it violates; but they do violate known constraints of quantum mechanical transformations. The impossibility of "controlled measurement" is best understood in terms of density operators as a description of quantum mechanical states (including probabilistic mixtures of two or more state-vectors); and the impossibility of "controlled initialisation" has to do with what realisable transformations map every state to some pure state (a density operator representing the situation of definitely having some single wave-vector as the state vector).

#1. Regarding "controlled measurements"

The first operation ("controlled measurement") is not allowed by quantum mechanics. The reason ultimately is that it is not a linear transformation of the state. Obviously, because there is a probability involved, I'm not talking about unitary transformations; but all operations in quantum mechanics — including Schrödinger evolution and projective measurement — can be realised as completely positive, trace-preserving linear transformations of density operators. As soon as we talk about performing different transformations with different probabilities, it makes the most sense to talk about density operators, because they can incorporate probabilistic mixtures of different pure states. The thing is that all transformations which can be realized quantum-mechanically are those which are linear, and which furthermore preserve the set of density operators (it maps positive semidefinite matrices to positive semidefinite matrices, and maps matrices with trace 1 to matrices with trace 1).

We can see that your mapping isn't linear, as follows. Consider the state $\def\conj{^{\ast}} |\psi\rangle = \bigl[ \alpha \;\; \beta \;\; 0 \;\; \delta \bigr]^\dagger$. The initial density matrix corresponding to this state is then $$\rho \;=\; |\psi\rangle\langle\psi| \;=\; \begin{bmatrix} \alpha\alpha\conj & \alpha\beta\conj & 0 & \alpha\delta\conj \\ \beta\alpha\conj & \beta\beta\conj & 0 & \beta\delta\conj \\ 0 & 0 & \;\;0\;\; & 0 \\ \delta\alpha\conj & \delta\beta\conj & 0 & \delta\delta\conj \end{bmatrix}.$$ Note that all of the non-zero entries of the matrix are linearly independent parameters from each other. The evolution you describe would yield each of the following states with probability $\beta\beta\conj/(\beta\beta\conj + \delta\delta\conj)$ and $\delta\delta\conj/(\beta\beta\conj + \delta\delta\conj)$ respectively, \begin{align*} |\phi_1\rangle \;&=\; \begin{bmatrix} \alpha \\ \sqrt{\beta\beta\conj + \delta\delta\conj} \\ 0 \\ 0 \end{bmatrix}, &\qquad |\phi_2\rangle \;&=\; \begin{bmatrix} \alpha \\ 0 \\ 0 \\ \sqrt{\beta\beta\conj + \delta\delta\conj} \end{bmatrix}, \end{align*} which have the corresponding density matrices \begin{align*} |\phi_1\rangle\langle\phi_1| \;&=\; \begin{bmatrix} \alpha\alpha\conj & \alpha\sqrt{\beta\beta\conj + \delta\delta\conj} & 0 & 0 \\ \alpha\conj\sqrt{\beta\beta\conj + \delta\delta\conj} & \beta\beta\conj + \delta\delta\conj & 0 & 0 \\ 0 & 0 & \;\;0\;\; & 0 \\ 0 & 0 & 0 & \;\;0\;\; \end{bmatrix}, \\[3ex] |\phi_2\rangle\langle\phi_2| \;&=\; \begin{bmatrix} \alpha\alpha\conj & 0 & 0 & \alpha\conj\sqrt{\beta\beta\conj + \delta\delta\conj} \\ 0 & \;\;0\;\; & 0 & \;\;0\;\; \\0 & 0 & \;\;0\;\; & 0 \\ \alpha\conj\sqrt{\beta\beta\conj + \delta\delta\conj} & 0 & 0 & \beta\beta\conj + \delta\delta\conj \end{bmatrix}. \end{align*} The resulting transformation is then the mapping \begin{align*} M(\rho) \;&=\; M\left( \begin{bmatrix} \alpha\alpha\conj & \alpha\beta\conj & 0 & \alpha\delta\conj \\ \beta\alpha\conj & \beta\beta\conj & 0 & \beta\delta\conj \\ 0 & 0 & \;\;0\;\; & 0 \\ \delta\alpha\conj & \delta\beta\conj & 0 & \delta\delta\conj \end{bmatrix} \right) \\[2ex]&=\; \frac{\beta\beta\conj}{\beta\beta\conj + \delta\delta\conj} |\phi_1\rangle\langle\phi_1| \;+\; \frac{\delta\delta\conj}{\beta\beta\conj + \delta\delta\conj} |\phi_2\rangle\langle\phi_2| \\[2ex]&=\; \begin{bmatrix} \alpha\alpha\conj & \alpha\tfrac{\beta\beta\conj}{\sqrt{\beta\beta\conj + \delta\delta\conj}} & 0 & \alpha\tfrac{\delta\delta\conj}{\sqrt{\beta\beta\conj + \delta\delta\conj}} \\ \alpha\conj\tfrac{\beta\beta\conj}{\sqrt{\beta\beta\conj + \delta\delta\conj}} & \beta\beta\conj & 0 & 0 \\ 0 & 0 & \;\;0\;\; & 0 \\ \alpha\conj\tfrac{\delta\delta\conj}{\sqrt{\beta\beta\conj + \delta\delta\conj}} & 0 & 0 & \delta\delta\conj \end{bmatrix}.\end{align*} This is not a linear function of the non-zero parameters $\alpha\alpha\conj$, $\alpha\beta\conj$, $\alpha\delta\conj$, etc. So the function $M$ on density operators is not a linear one, and thus not a physically valid transformation of density operators.

#2. Regarding "controlled initialisations"

The second operation ("controlled initialisation") is also not possible, quantum-mechanically, for an arbitrary initial state. The only deterministic operations (ones which yield a pure state with certainty) are the ones which erase information and prepare a new constant state, and unitary operations. Your map is obviously not constant. It isn't unitary either, because it doesn't preserve inner products: we can see this by considering the two vectors $\bigl[ \alpha, \beta, \gamma, \beta \bigr]$ and $\bigl[ \alpha, \beta, \gamma, -\beta \bigr]$ for $\beta \ne 0$, and any values of $\alpha, \gamma \in \mathbb C$, which may even be orthogonal but are ultimately mapped to the same vector. So the notion you present of "controlled initialization" is not valid either.

-
While that evolution works for the example, it doesn't perform what I want in the general case, which is to collapse $b$, which I don't think is possible with a unitary transform in the general case since it is a lossy operation. I understand that $b$ may measure differently than in such an uncontrolled measurement, but that would only be the case if $a$ measures differently that what it was controlled as. i.e. I only want to know, if $a$ were eventually to measure as 1, what will $b$ measure as? – Chris Pacejo Jan 17 '13 at 5:06
The general case of $b$ collapsing is not actually what is being described by the evolution you're describing. It sounds as though you want to perform a unitary transformation $U$, in which there is no measurement outcome, but such that if $U$ is the last unitary operation to act on $a$, and if $a$ is eventually measured and found to be $1$, then the reduced state of $b$ becomes one of two states, corresponding to $b$ actually having been measured at the time of $U$; and for $a=0$ it is as if no $b$ measurement took place at that time. Is that correct? – Niel de Beaudrap Jan 17 '13 at 10:49
Your understanding is correct, but since such an operation isn't reversible, obviously there's no such unitary transform. Hence why I'm fishing from the "measurement" angle (since measurement is a "special" operation). Note also my edit; what I'm actually after is controlled-initialization (another non-reversible operation); I had just figured controlled-measurement was the most expedient means of achieving this (though impossible as Peter Shor points out). – Chris Pacejo Jan 17 '13 at 15:10
@ChrisK: Well, the operation that I describe is exactly feasible using Dan Stahlke's answer. It doesn't perform a measurement at the time, but if you measure $a$ afterwards, the state of $b$ will collapse in the appropriate ways and the qubit $c$ will contain the measurement outcome. Your evolution just doesn't happen to correspond to a measurement. As for controlled initialization: it suffices to perform a $\text{CR}_Y(\pi/2) \;=\; \exp(-i\pi Y/4)$ operation to the initial state, as I have described. – Niel de Beaudrap Jan 17 '13 at 16:02
@ChrisK: I think that perhaps you should revise your question to make it quite clear what precisely you're looking for --- it seems that you're not looking for a measurement process, but a specific evolution of quantum states which would give you a state preparation which you're interested in. If you decluttered your post to describe what it is you're actually looking for, it will be easier to give a simple answer to your question. – Niel de Beaudrap Jan 17 '13 at 16:03

What you're looking for (I assume, based on your example) is a quantum operation which takes

$$(\alpha, \beta, \gamma, \delta)$$

to

$$(\alpha, u, \gamma, 0)$$ with probability $\frac{|\beta^2|}{| \beta^2| + |\delta^2|}$

and

$$(\alpha, 0, \gamma, u')$$
with probability $\frac{|\delta^2|}{|\beta^2| + |\delta^2|}.$

If you insist on getting the result of the measurement somehow, then this is impossible, because if you start with a few copies of a state $$(\alpha, \epsilon_1, \gamma, \epsilon_2),$$ then assuming you can do what you want, you will be able to approximate the ratio between $\epsilon_1$ and $\epsilon_2$ regardless of how small $\epsilon_1$ and $\epsilon_2$ are, something which violates the principles of quantum mechanics.

You want to start with $(\alpha, \beta, \gamma, \delta)$, and get $$(\alpha, e^{i\theta}\sqrt{|\beta^2|+|\delta^2|}, \gamma, 0).$$

This is impossible. Suppose first that the phase is always 1. This means that you can start with $(\frac{\alpha}{2}, \pm\frac{\beta}{\sqrt{2}}, \frac{\alpha}{2},0)$, and get $(\frac{\alpha}{2}, \frac{\beta}{\sqrt{2}}, \frac{\alpha}{2},0)$. However, if you started with a mixture of the two vectors $(\alpha\frac{1}{2}, \pm\beta\frac{1}{\sqrt{2}}, \alpha\frac{1}{2},0)$, this is the same as a mixture of the vectors $(\frac{1}{\sqrt{2}}, 0,\frac{1}{\sqrt{2}},0)$ and $(0,1,0,0)$. Your operation takes a mixture of these two vectors and turns it into a superposition of these two vectors. But turning a mixture into a superposition is impossible by the laws of quantum mechanics.

This means that the operation must preserve phases. But now, we somehow need a quantum operation that maps points on the Bloch sphere composed by the second and fourth coordinates of your vector into a single dimension. This is the same as putting a complex phase on each point of the unit sphere so that opposite points have the opposite phase. That is, you want a continuous map of the unit sphere onto the circle with antipodes mapped to antipodes. I am fairly sure this is topologically impossible (although I'd appreciate anybody who can cite a theorem proving this).

-
Thank you, this makes a lot of sense. However I should have been clearer as to my goal: I actually wish to conditionally initialize some qubits. Since obviously initialization is not a unitary operation, I have been modeling it as a measurement + an XOR based on the measurement. Assuming instead that initialization is an elementary operation, it seems that controlled initialization would not violate the rule you state above (since no measurement is being made). Is this correct? Would controlled-initialization run into a different problem? (I've updated the question accordingly.) – Chris Pacejo Jan 17 '13 at 5:22

Such an operation is indeed physically realizable. Suppose you wish to measure qubit $b$ if qubit $a$ is in the 1 state. Then just measure $a$, and if you get 1 then measure $b$ (e.g. the lab assistant puts $b$ into the measurement apparatus or not depending on the outcome of the $a$ measurement). But maybe you wanted to accomplish this without measuring $a$. In that case, prepare an ancillary state $c$, do a controlled-controlled-not operation between $a,b,c$, then measure $c$. The controlled-controlled-not operation is $\textrm{CCNOT}_{abc} = \left|0\right>\left<0\right|_a \otimes I_b \otimes I_c + \left|1\right>\left<1\right|_a \otimes \textrm{CNOT}_{bc}$ where $\textrm{CNOT}_{bc} = \left|0\right>\left<0\right|_b \otimes I_c + \left|1\right>\left<1\right|_b X_c$.

If $a$ was 1 then you have done a controlled-not between $b$ and $c$ which in effect copies the state of $b$ to $c$. By then measuring $c$ you get the same result as if you had measured $b$. On the other hand, if $a$ was 0 then the controlled-not doesn't happen and $c$ is left in its initial state. Measuring $c$ then gives 0 without having any effect on $b$.

Just like with any controlled-operation, there will be an impact on the qubit $a$. Specifically, if $b$ is in the 1 state then by doing this controlled measurement you end up gaining information about $a$, causing it to decohere or collapse as if it had been measured. If $b$ was in the zero state then there will be no effect on $a$ (notice that this circuit is symmetric between the $a$ and $b$ qubits).

There is no possible way of doing a measurement of $b$ controlled by $a$ without having an effect on $a$. The reason is that the measurement outcome (or non-outcome) will always reveal information about whether the measurement had been done, which in turn reveals information about the state of $a$.

-
Maybe I'm missing something, but I'm not sure this effects a controlled-measurement as I described it. Consider the example where $a$ and $b$ are both in the first Hadamard state, and $c$ is 0, so the state vector (ignoring phase) is $\left[\sqrt{1/4},\sqrt{1/4},\sqrt{1/4},\sqrt{1/4},0,0,0,0\right]$. After CCNOT, this becomes $\left[\sqrt{1/4},\sqrt{1/4},\sqrt{1/4},0,0,0,0,\sqrt{1/4}\right]$, which means that $c$ is 0 with 75% probability, and 1 with 25% probability, when it should be 50% for both. – Chris Pacejo Jan 16 '13 at 18:13
You said you wanted to measure the second qubit when the first was in the 0 state (although my example uses 1 not 0). You didn't specify what should happen when the first qubit is in the $\left|x^+\right>$ state. When $a$ is in the $\left|x^+\right>$ state, it is in a superposition of 0 and 1, so my CCNOT circuit is in a superposition of measuring $b$ and not. The outcome is halfway between measuring $b$ which gives 0 with 50% probability and not measuring $b$ which gives 0 with 100% probability. The outcome is then 0 with (50%+100%)/2=75% probability. – Dan Stahlke Jan 16 '13 at 18:49
No, I want to measure what $b$ is conditioned on $a$ being 0; I don't want to measure $b$ when $a$ is 0 and $0$ when $a$ is 1. – Chris Pacejo Jan 16 '13 at 20:51
OK, I see what your method is doing now -- it is effectively saving the value of $b$ to $c$ so that eventually, when I measure the entire system, if $a=1$, I can ferret out what $b$ would have been had I measured it at the point when I saved its value. What's missing is that I wanted to know what $b$ would be if $a=1$ before continuing with the rest of the operation; but as Peter Shor pointed out this is impossible. – Chris Pacejo Jan 17 '13 at 20:06