# What is a unitary operator that makes all the amplitudes all negative on the arbitrary state of $n$ qubits?

What is a unitary operator that makes all the amplitudes all negative on the arbitrary state of $$n$$ qubits? For example suppose, $$n=2$$, the arbitrary state is: $$a_1|00\rangle+a_2|01\rangle-a_3|10\rangle+a_4|11\rangle$$ then the unitary operator will give the result $$-a_1|00\rangle-a_2|01\rangle-a_3|10\rangle-a_4|11\rangle$$ on the above state (where $$a_i$$ are real positive numbers that are the amplitudes).

In other words the amplitudes are not complex numbers and the negative signs are randomly distributed regarding the $$a_i$$ for $$n=2$$; a similar statement is true for any $$n$$. Also we do not know for which $$a_i$$is negative or positive without measuring the state (which will destroy the state and we do not want to destroy the state).

An informal description of what the question asks is, is there a unitary operator that gives the version of an arbitrary state which has negated absolute values of all the original amplitudes in the resulting state generated by the unitary operator.

• Are you looking for $-I$ where $I$ is the identity matrix? Nov 16 '20 at 11:26
• @Rammus That would not work since it would give -a1|00>-a2|01>+a3|10>-a4|11> and thus a3 is positive-this does not answer my question since the question asks for a unitary operator to make all the amplitudes negative
– Z.E.
Nov 16 '20 at 11:28
• I am not sure exactly what you are asking: - If you want something that returns negative amplitude on all entries of the statevector regardless of the sign of the input, that is definitely not possible, because it's not a reversible operation. - If you are looking for something that flips the signs only, that should be possible. Can you clarify? Nov 16 '20 at 12:16
• @Z.E. Ok I think I didn't understand your question correctly then. Nov 16 '20 at 12:48

If I understand your question correcly, you are asking for a unitary that, in effect, looks at amplitudes in the computational basis, which are assumed to all be real, and if they are positive, make them negative.

This, quite simply, is impossible for a unitary. To see this, note that you would have (in the 1-qubit case, although you can do exactly the same for any number of qubits) $$U(|0\rangle-|1\rangle)=-|0\rangle-|1\rangle,\qquad U(|0\rangle+|1\rangle)=-|0\rangle-|1\rangle.$$ In other words, there are two distinct inputs that produce the same output. This is not a reversible procedure, and therefore cannot be unitary (because all unitaries are reversible).

(Technically, I should allow for the introduction of ancilla qubits as well. This will not change the conclusion).

• Can you move the negative sign into the value of the ket (there seems to be a related step in Grovers algorithm that moves the sign out of the ket) and then compute the absolute value function on each each ket? Obviously any classical function such as absolute value can be done on a quantum computer (it may need to be made into a reversible function though).After all that is done multiply by a negated identity matrix to get the required answer.
– Z.E.
Nov 16 '20 at 13:50
• No the labels on a ket are very different things from what's going on with the amplitudes. Yes, you can calculate absolute values on a quantum computer, and those are absolute values of whatever is represented by the labels of the kets. But that does not influence the amplitudes. Nov 16 '20 at 14:56
• Suppose we consider an approximate version of this where the output vector is not exactly -|0>-|1> but is the -|0>-|1> state plus e1|0>+e2|1> or e3|0>+e4|1> (corresponding to the two different input states to the unitary operator) for some small real valued positive of negative numbers e1,e2,e3,e4 .This will make it two different output and reversible- but the desired output as near as required by reducing the e1,e2,e3 or e4 to the desired output -|0>-|1>. Does this approximate version have a solution in this case?
– Z.E.
Nov 17 '20 at 11:01
• No. The next step in making my proof more formal is to add the two equations together (since $U$ is linear), so you get $U|0\rangle=-2(|0\rangle+|1\rangle)$. This is clearly not norm preserving. Just adding small amounts to either output cannot change that. Nov 17 '20 at 11:11
• I meant that if you add the e1,e2,e3,e4 right from the start then the unitary operator can be made to be reversible since the logic in your proof, that makes your proof work,requires to show that the unitary operator is non reversible
– Z.E.
Nov 17 '20 at 11:18

First, apply $$X$$ gate on second qubit and then controlled $$Z$$ gate. The resulting state would be $$a_1|00\rangle + a_2|01\rangle + a_3|10\rangle + a_4|11\rangle$$. Now, you can apply operator $$-I$$ which is a global phase $$\pi$$.

In fact, you do not have to apply global phase operator as states which differ in global phase only as indistinguishable.

• That only works for the specific example a1|00⟩+a2|01⟩−a3|10⟩+a4|11⟩ given in the question, the negative sign can be on any of the amplitudes in the arbitrary state not just a3, also the question is asking does the unitary operator exist for any n. Also measuring the state is not allowed.
– Z.E.
Nov 16 '20 at 13:30
• @Z.E.: Yes, that is right. Nov 17 '20 at 7:49

You should know that amplitudes are not OBSERVABLES (they cannot be measured). In general, the minus sign is just a phase factor ($$-1 = e^{i\pi}$$), which is irrelevant to the statistical outcome, since $$|a|^2 = |-a|^2$$.

Consequently, we cannot find an unitary operation that distinguishes between a minus signed amplitude and a positive one (or either the amplitude of a bigger magnitude from others).