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.


Posted 2020-11-16T11:21:43.117

Reputation: 21

1Are you looking for $-I$ where $I$ is the identity matrix? – Rammus – 2020-11-16T11:26:09.473

@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. – 2020-11-16T11:28:12.973

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?
  • < – Enrico – 2020-11-16T12:16:33.857

@Z.E. Ok I think I didn't understand your question correctly then. – Rammus – 2020-11-16T12:48:59.293



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).


Posted 2020-11-16T11:21:43.117

Reputation: 35 722

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. – 2020-11-16T13:50:23.077

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. – DaftWullie – 2020-11-16T14:56:32.677

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. – 2020-11-17T11:01:20.187

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. – DaftWullie – 2020-11-17T11:11:19.737

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. – 2020-11-17T11:18:04.790


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.

Martin Vesely

Posted 2020-11-16T11:21:43.117

Reputation: 7 763

1That 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. – 2020-11-16T13:30:48.477

@Z.E.: Yes, that is right. – Martin Vesely – 2020-11-17T07:49:24.170


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

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


Posted 2020-11-16T11:21:43.117

Reputation: 51