# Optimal Manipulations with Qubits: Universal NOT Gate

## Abstract

It is not a problem to complement a classical bit, i.e. to change the value of a bit, a $`0`$ to a $`1`$ and vice versa. This is accomplished by a NOT gate. Complementing a qubit in an unknown state, however, is another matter. We show that this operation cannot be done perfectly. We define the Universal-NOT (U-NOT) gate which out of $`N`$ identically prepared pure input qubits generates $`M`$ output qubits in a state which is as close as possible to the perfect complement. This gate can be realized by classical estimation and subsequent re-preparation of complements of the estimated state. Its fidelity is therefore equal to the fidelity $`=(N+1)/(N+2)`$ of optimal estimation, and does not depend on the required number of outputs. We also show that when some additional a priori information about the state of input qubit is available, than the fidelity of the quantum NOT gate can be much better than the fidelity of estimation.   
PACS number: 03.65.Bz, 03.67.-a

> There was an odd qubit from Donegal,   
> who wanted to become most orthogonal.   
> He went through a gate,   
> but not very straight,   
> and came out instead as a Buckyball.

Classical information consists of bits, each of which can be either $`0`$ or $`1`$. Quantum information, on the other hand, consists of qubits which are two-level quantum systems with one level labeled $`|0`$ and the other $`|1`$. Qubits can not only be in one of the two levels, but in any superposition of them as well. This fact makes the properties of quantum information quite different from those of its classical counterpart. For example, it is not possible to construct a device which will perfectly copy an arbitrary qubit  while the copying of classical information presents no difficulties. Another difference between classical and quantum information is as follows: It is not a problem to complement a classical bit, i.e. to change the value of a bit, a $`0`$ to a $`1`$ and vice versa. This is accomplished by a NOT gate. Complementing a qubit, however, is another matter. The complement of a qubit $`|\mathrm{\Psi }`$ is the qubit $`|\mathrm{\Psi }^{}`$ which is orthogonal to it. Is it possible to build a device which will take an arbitrary (unknown) qubit and transform it into the qubit orthogonal to it?

The best intuition for this problem is obtained by looking at the desired operation as an operation on the Poincaré sphere, which represents the set of pure states of a qubit system. Thus every state, pure or mixed, is represented by a vector in a three-dimensional space, whose components are the expectations of the three Pauli matrices. The full state space is thereby mapped onto the unit ball, whose surface represents the set of pure states. In this picture the ambiguity of choosing an overall phase for $`|\mathrm{\Psi }`$ is already eliminated. The points corresponding to $`|\mathrm{\Psi }`$ and $`|\mathrm{\Psi }^{}`$ are antipodes of each other. The desired Universal-NOT (U-NOT) operation is therefore nothing but the inversion of the Poincaré sphere.

Note that the inversion preserves angles (related in a simple way to the scalar product $`|\mathrm{\Phi },\mathrm{\Psi }|`$ of rays), so by Wigner’s Theorem the ideal U-NOT must be implemented either by a unitary or by an anti-unitary operation. Unitary operations correspond to proper rotations of the Poincaré sphere, whereas anti-unitary operations correspond to orthogonal transformations with determinant $`1`$. Clearly, the U-NOT operation is of the latter kind, and an anti-unitary operator $`\mathrm{\Theta }`$ (unique up to a phase) implementing it is

$$\mathrm{\Theta }\left(\alpha |0+\beta |1\right)=\beta ^{}|0\alpha ^{}|1.$$
(1)   
The difficulty with anti-unitarily implemented symmetries is that they are not completely positive, i.e., they cannot be applied to a small system, leaving the rest of the world alone. (The tensor product of an anti-linear and a linear operator is ill-defined). Thus time-reversal, perhaps the best known operation of this kind, can only be a global symmetry, but makes no sense when applied only to a subsystem. By definition, a “gate” is an operation applied to only a part of the world, so must be represented by a completely positive operation. By the Stinespring Dilation Theorem this is equivalent to saying that any gate must have a realization by coupling the given system to a larger one (some ancillas), performing a unitary operation on the large system, and subsequently restricting to a subsystem. Hence an ideal U-NOT gate does not exist.

The same is true, of course, for other anti-unitarily implemented operations like the complex conjugation (or equivalently the transposition) of the density matrix, which corresponds to the reflection of the sphere at the $`x_2=0`$ plane, because only the Pauli matrix $`\sigma _2`$ has imaginary entries. Clearly, any such operation can be represented by a U-NOT, followed by a suitable unitary rotation, and conversely. On the other hand, if we relax the “universality” condition, the U-NOT operation may become viable: if we are promised that the elements of the density matrix (or the components of $`|\mathrm{\Psi }`$) are real, the states lie in the $`x_2=0`$ plane so that the inversion at the center is equivalent to a proper rotation by $`\pi `$ around the $`x_2`$-axis.

Because we cannot design a perfect Universal-NOT gate, what we would like to do is see how close we can come. At this point we can consider two scenarios. The first one is based on the measurement of input qubit(s) – using the results of an optimal measurement we can manufacture an orthogonal qubit, or any desired number of them. Obviously, the fidelity of the NOT operation in this case is equal to the fidelity of estimation of the state of the input qubit(s). The second scenario would be to approximate an anti-unitary transformation on a Hilbert space of the input qubit(s) by a unitary transformation on a larger Hilbert space which describes the input qubit(s), blank qubits which are to become the complements, and the quantum device playing the rôle of the gate. We demand that the gate performs equally well for any (unknown) pure input state, so it is natural to focus on universal gates “U-NOT”, i.e., gates which treat every state vector in the same way in the sense of unitary symmetry. In what follows we shall address both scenarios.

In order to state our problem precisely, let $`=𝐂^2`$ denote the two-dimensional Hilbert space of a single qubit Then the input state of $`N`$ systems prepared in the pure state $`|\mathrm{\Psi }`$ is the $`N`$-fold tensor product $`|\mathrm{\Psi }^N^N`$. The corresponding density matrix is $`\rho \sigma ^N`$, where $`\sigma =|\mathrm{\Psi }\mathrm{\Psi }|`$ is the one-particle density matrix. An important observation is that the vectors $`|\mathrm{\Psi }^N`$ are invariant under permutations of all $`N`$ sites, i.e., they belong to the symmetric, or “Bose”-subspace $`_+^N^N`$. Thus as long as we consider only pure input states we can assume all the input states of the device under consideration to be density operators on $`_+^N`$. We will denote by $`𝒮()`$ the density operators over a Hilbert space $``$. Then the U-NOT gate must be a completely positive trace preserving map $`T:𝒮\left(_+^N\right)𝒮()`$. Our aim is to design $`T`$ in such a way that for any pure one-particle state $`\sigma 𝒮()`$ the output $`T(\sigma ^N)`$ is as close as possible to the orthogonal qubit state $`\sigma ^{}=𝟙\sigma `$. In other words, we are trying to make the fidelity $`:=\mathrm{Tr}[\sigma ^{}T(\sigma ^N)]=1\mathrm{\Delta }`$ of the optimal complement with the result of the transformation $`T`$ as close as possible to unity for an arbitrary input state. This corresponds to the problem of finding the minimal value of the error measure $`\mathrm{\Delta }(T)`$ defined as

$$\mathrm{\Delta }(T)=\underset{\sigma ,\mathrm{pure}}{\mathrm{max}}\mathrm{Tr}\left[\sigma T(\sigma ^N)\right].$$
(2)   
Note that this functional $`\mathrm{\Delta }`$ is completely unbiased with respect to the choice of input state. More formally, it is invariant with respect to unitary rotations (basis changes) in $``$: When $`T`$ is any admissible map, and $`U`$ is a unitary on $``$, the map $`T_U(\rho )=U^{}T(U^N\rho U_{}^{}{}_{}{}^{N})U`$ is also admissible, and satisfies $`\mathrm{\Delta }(T_U)=\mathrm{\Delta }(T)`$. We will show later on that one may look for optimal gates $`T`$, minimizing $`\mathrm{\Delta }(T)`$, among the universal ones, i.e., the gates satisfying $`T_U=T`$ for all $`U`$. For such U-NOT gates, the maximaization can be omitted from the definition (2), because the fidelity $`\mathrm{Tr}\left[\sigma T(\sigma ^N)\right]`$ is independent of $`\sigma `$.

Measurement-based scenario   
An estimation device by definition takes an input state $`\rho 𝒮(_+^N)`$ and produces, on every single experiment, an “estimated pure state” $`\sigma 𝒮()`$. As in any quantum measurement this will not always be the same $`\sigma `$, even with the same input state $`\rho `$, but a random quantity. The estimation device is therefore described completely by the probability distribution of pure states it produces for every given input. Still simpler, we will characterize it by the corresponding probability density with respect to the unique normalized measure on the pure states (denoted “$`d\mathrm{\Phi }`$” in integrals), which is also invariant under unitary rotations. For an input state $`\rho 𝒮(_+^N)`$, the value of this probability density at the pure state $`|\mathrm{\Phi }`$ is

$$p(\mathrm{\Phi },\rho )=(N+1)\mathrm{\Phi }^N,\rho \mathrm{\Phi }^N.$$
(3)   
To check the normalization, note that $`𝑑\mathrm{\Phi }p(\mathrm{\Phi },\rho )=\mathrm{Tr}[X\rho ]`$ for a suitable operator $`X`$, because the integral depends linearly on $`\rho `$. By unitary invariance of the measure “$`d\mathrm{\Phi }`$” this operator commutes with all unitaries of the form $`U^N`$, and since these operators, restricted to $`_+^N`$ form an irreducible representation of the unitary group of $``$ \[for $`d=2`$, it is just the spin $`N/2`$ irreducible representation of SU(2)\], the operator $`X`$ is a multiple of the identity. To determine the factor, one inserts $`\rho =𝟙`$, and uses the normalization of “$`d\mathrm{\Phi }`$” to verify that $`X=1`$.

Note that the density (3) is proportional to $`|\mathrm{\Phi },\mathrm{\Psi }|^{2N}`$, when $`\rho =|\mathrm{\Psi }^N\mathrm{\Psi }^N|`$ is the typical input to such a device: $`N`$ systems prepared in the same pure state $`|\mathrm{\Psi }`$. In that case the probability density is clearly peaked sharply at states $`|\mathrm{\Phi }`$ which are equal to $`|\mathrm{\Psi }`$ up to a phase.

Suppose now that we combine the state estimation with the preparation of a new state, which is some function of the estimated state. The overall result will then be the integral of the state valued function with respect to the probability distribution just determined. In the case at hand the desired function is $`f(\mathrm{\Phi })=(𝟙|\mathbb{\Phi }\mathbb{\Phi }|)`$. So the result of the whole measurement-based (“classical”) scheme is

$$\sigma ^{(out)}=T(\rho )=𝑑\mathrm{\Phi }p(\mathrm{\Phi },\rho )\left(𝟙|\mathbb{\Phi }\mathbb{\Phi }|\right).$$
(4)   
The fidelity required for the computation of $`\mathrm{\Delta }`$ from Eq.(2) is then equal to (see also )

$`\mathrm{\Delta }=(N+1){\displaystyle 𝑑\mathrm{\Phi }|\mathrm{\Phi },\mathrm{\Psi }|^{2N}(1|\mathrm{\Phi },\mathrm{\Psi }|^2)}={\displaystyle \frac{1}{N+2}},`$ (5)   
where we have used that the two integrals have exactly the same form (differing only in the choice of $`N`$), and that the first integral is just the normalization integral. Since this expression does not depend on $`\sigma `$, we can drop the maximization in the definition (2) of $`\mathrm{\Delta }`$, and find $`\mathrm{\Delta }(T)=1/(N+2)`$, from which we find that the fidelity of creation of a complement to the original state $`\sigma `$ is $`=\frac{N+1}{N+2}`$. Finally we note, that the result of the operation (4) can be expressed in the form

$$\sigma ^{(out)}=s__N\sigma ^{}+\frac{1s__N}{2}𝟙,$$
(6)   
with the “scaling” parameter $`s__N=\frac{N}{N+2}`$. From here it is seen that in the limit $`N\mathrm{}`$, perfect estimation of the input state can be performed, and, consequently, the perfect complement can be generated. For finite $`N`$ the mean fidelity is always smaller than unity. The advantage of the measurement-based scenario is that once the input qubit(s) is measured and its state is estimated an arbitrary number $`M`$ of identical (approximately) complemented qubits can be produced with the same fidelity, simply by replacing the output function $`f(\mathrm{\Phi })=(𝟙|\mathbb{\Phi }\mathbb{\Phi }|)`$ by $`f_M(\mathrm{\Phi })=(𝟙|\mathbb{\Phi }\mathbb{\Phi }|)^𝕄`$.

Quantum scenario: U-NOT gate   

Let us assume we have $`N`$ input qubits in an unknown state $`|\mathrm{\Psi }`$ and we are looking for a transformation which generates $`M`$ qubits at the output in a state as close as possible to the orthogonal state $`|\mathrm{\Psi }^{}`$. The universality of the proposed transformation has to guarantee that an arbitrary input state is complemented with the same fidelity. If we want to generate $`M`$ approximately complemented qubits at the output, the U-NOT gate has to be represented by $`2M`$ qubits (irrespective of the number, $`N`$, of input qubits), $`M`$ of which will only serve as ancilla, and $`M`$ of which become the output complements. We will indicate these subsystems by subscripts “a”=input, “b”=ancilla, and “c”=(prospective) output. The U-NOT gate transformation, $`U_{NM}`$, acts on the tensor product of all three systems. The gate is always prepared in some state $`|X_{bc}`$, independently of the input state $`|\mathrm{\Psi }`$. The transformation is determined by the following explicit expression, valid for every unit vector $`|\mathrm{\Psi }`$:

$`U_{NM}|N\mathrm{\Psi }_a|X_{bc}={\displaystyle \underset{j=0}{\overset{M}{}}}\gamma _j|X_j(\mathrm{\Psi })_{ab}|\{(Mj)\mathrm{\Psi }^{};j\mathrm{\Psi }\}_c;\gamma _j=(1)^j\left({\displaystyle \genfrac{}{}{0pt}{}{N+Mj}{N}}\right)^{1/2}\left({\displaystyle \genfrac{}{}{0pt}{}{N+M+1}{M}}\right)^{1/2},`$ (7)   
where $`|N\mathrm{\Psi }_a=|\mathrm{\Psi }^N`$ is the input state consisting of $`N`$ qubits in the same state $`|\mathrm{\Psi }`$. On the right hand side of Eq.(7) $`|\{(Mj)\mathrm{\Psi }^{};j\mathrm{\Psi }\}_c`$ denotes symmetric and normalized states with $`(Mj)`$ qubits in the complemented (orthogonal) state $`|\mathrm{\Psi }^{}`$ and $`j`$ qubits in the original state $`|\mathrm{\Psi }`$. Similarly, the vectors $`|X_j(\mathrm{\Psi })_{ab}`$ consist of $`N+M`$ qubits, and are given explicitly by

$`|X_j(\mathrm{\Psi })_{ab}=|\{(N+Mj)\mathrm{\Psi };j\mathrm{\Psi }^{}\}_{ab}.`$ (8)   
Here the coefficients $`\gamma _j`$ were chosen so that the scalar product of the right hand side with a similar vector written out for $`|\mathrm{\Phi }`$, becomes $`\mathrm{\Psi },\mathrm{\Phi }^N`$. This implies at the same time that $`U_{NM}`$ is linear and that it is unitary after suitable extension to the orthogonal complement of the vector $`|X_{bc}`$.

Each of the $`M`$ qubits at the output of the U-NOT gate is described by the density operator (6) with $`s__N=\frac{N}{N+2}`$, irrespective of the number of complements produced. The fidelity of the U-NOT gate depends only on the number of inputs. This means that this U-NOT gate can be thought of as producing an approximate complement and then cloning it, with the quality of the cloning independent of the number of clones produced. The universality of the transformation is directly seen from the “scaled” form of the output operator (6).

We stress that the fidelity of the U-NOT gate (7) is exactly the same as in the measurement-based scenario. Moreover, it also behaves as a classical (measurement-based) gate in a sense that it can generate an arbitrary number of complements with the same fidelity. We have also checked that these cloned complements are pairwise separable.

The $`N+M`$ qubits at the output of the gate which do not represent the complements are individually in the state described by the density operator

$`\sigma _j^{(out)}=s\sigma +{\displaystyle \frac{1s}{2}}𝟙,𝕛=\mathrm{𝟙},\mathrm{},+𝕄,`$ (9)   
with the scaling factor $`s=\frac{N}{N+2}+\frac{2N}{(N+M)(N+2)}`$ i.e. these qubits are the clones of the original state with a fidelity of cloning larger than the fidelity of estimation. This fidelity depends on the number, $`M`$, of clones produced out of the $`N`$ originals, and in the limit $`M\mathrm{}`$ the fidelity of cloning becomes equal to the fidelity of estimation. These qubits represent the output of the optimal $`NN+M`$ cloner introduced by Gisin and Massar . This means that the U-NOT gate as presented by the transformation in Eq. (7) serves also as a universal cloning machine.

At this point the question arises whether the transformation (7) represents the optimal U-NOT gate via quantum scenario. If this is so, then it would mean that the measurement-based and the quantum scenarios realize the U-NOT gate with the same fidelity.

Theorem. Let $``$ be a Hilbert space of dimension $`d=2`$. Then among all completely positive trace preserving maps $`T:𝒮\left(_+^N\right)𝒮()`$, the measurement-based U-NOT scenario (4) attains the smallest possible value of the error measure defined by Eq.(2), namely $`\mathrm{\Delta }(T)=1/(N+2)`$.

We have already shown \[see Eq.(5)\] that for the measurement-based strategy the error $`\mathrm{\Delta }`$ attains the minimal value $`1/(N+2)`$. The more difficult part, however, is to show that no other scheme \[i.e., quantum scenario\] can do better. Here we will largely follow the arguments in .

Recall first the rotation invariance of the functional $`\mathrm{\Delta }`$, noted after Eq.(2). Moreover, $`\mathrm{\Delta }`$ is defined as the maximum of a collection of linear functions in $`T`$, and is therefore convex. Putting these observations together we get

$$\mathrm{\Delta }(\widehat{T})𝑑U\mathrm{\Delta }(T_U)=\mathrm{\Delta }(T),$$
(10)   
where $`\widehat{T}=𝑑UT_U`$ is the average of the rotated operators $`T_U`$ with respect to the Haar measure on the unitary group. Thus $`\widehat{T}`$ is at least as good as $`T`$, and is a universal NOT gate ($`\widehat{T}_U=\widehat{T}`$). Without loss we will therefore assume from now on that $`T_U=T`$ for all $`U`$.

An advantage of this step is that a very explicit general form for universal operations is known from the “covariant form” of the Stinespring Dilation Theorem (see  for a version adapted to our needs). The form of $`T`$ is further simplified in our case by the fact that both representations involved are irreducible: the defining representation of SU(2) on $``$, and the representation by the operators $`U^N`$ restricted to the symmetric subspace $`_+^N`$. Then $`T`$ can be represented as a convex combination $`T=_j\lambda _jT_j`$, with $`\lambda _j0,_j\lambda _j=1`$, and $`T_j`$ universal gates in their own right, but of an even simpler form. Universality of $`T`$ already implies that the maximum can be omitted from the definition (2) of $`\mathrm{\Delta }`$, because the fidelity no longer depends on the pure state chosen. In a convex combination of universal operators $`T_j`$ we therefore get

$$\mathrm{\Delta }(T)=\underset{j}{}\lambda _j\mathrm{\Delta }(T_j).$$
(11)   
Minimizing this expression is obviously equivalent to minimizing with respect to the discrete parameter $`j`$.

We write the general form of the extremal gates $`T_j`$ in terms of expectation values of the output state for an observable $`X`$ on $``$:

$$\mathrm{Tr}\left[T(\rho )X\right]=\mathrm{Tr}\left[\rho V^{}(X𝟙)𝕍\right],$$
(12)   
where $`V:_+^N𝐂^{2j+1}`$ is an isometry intertwining the respective representations of SU(2), namely the restriction of the operators $`U^N`$ to $`_+^N`$ (which has spin $`N/2`$) on the one hand, and the tensor product of the defining representation (spin-$`1/2`$) with the irreducible spin-$`j`$ representation. By the triangle inequality for Clebsch-Gordan reduction, this implies $`j=(N/2)\pm (1/2)`$, so only two terms appear in the decomposition of $`T`$. It remains to compute $`\mathrm{\Delta }(T_j)`$ for these two values. Omitting the details of the calculations (these follow closely the arguments presented in Ref.) we find that

$$\mathrm{\Delta }(T)=\{\begin{array}{cc}1\hfill & \text{for }j=\frac{N}{2}+\frac{1}{2}\hfill \\ \frac{1}{N+2}\hfill & \text{for }j=\frac{N}{2}\frac{1}{2}\hfill \end{array}.$$
(13)   
The first value corresponds to getting the state $`\sigma `$ from a set of $`N`$ copies of $`\sigma `$. The fidelity $`1`$ is expected for this trivial task, because taking any one of the copies will do perfectly. On the other hand, the second value is the minimal error in the optimal U-NOT gate, which we were looking for. This clearly coincides with the value (5), so the Theorem is proved.

Rôle of a priori knowledge   
As was noted earlier, if the input state $`|\mathrm{\Psi }=\alpha |0+\beta |1`$ is restricted to the case where the coefficients $`\alpha `$ and $`\beta `$ are real, then it is possible to construct a perfect quantum NOT gate. A measurement-based strategy in this case does not do as well. Specifically, the mean fidelity of optimal estimation in the present case increases as a function of input qubits as (see ) $`=\frac{1}{2}+\frac{1}{2^{N+1}}_{j=0}^{N1}\sqrt{\left(\genfrac{}{}{0pt}{}{N}{j}\right)\left(\genfrac{}{}{0pt}{}{N}{j+1}\right)}`$, and it attains a value equal to unity only in the limit $`N\mathrm{}`$. This means that with a priori knowledge of the set of inputs, the quantum NOT can perform better than the measurement-based strategy.

Summarizing our conclusions, we have shown that there is another difference between classical and quantum information: classical bits can be complemented, while arbitrary qubits cannot. It is, none the less, possible to construct approximate quantum-complementing devices the quality of whose output is independent of the state of their input. These devices we called U-NOT gates. They are closely related to quantum cloners, and exploiting this connection it is possible to find an explicit transformation for a $`N`$-qubit input and $`M`$-qubit output U-NOT gate. When there is no a priori information available about the state of input qubits then these U-NOT gates do not do better than a measurement-based strategy. On the other hand, as we have shown, partial a priori information can dramatically improve performance of the U-NOT gate.

This work was in part supported by the Royal Society and by the Slovak Academy of Sciences. V.B. and R.F.W. thank the Benasque Center for Physics where part of this work was carried out.