Quantum circuits cannot control unknown operations

One of the essential building blocks of classical computer programs is the"if"clause, which executes a subroutine depending on the value of a control variable. Similarly, several quantum algorithms rely on applying a unitary operation conditioned on the state of a control system. Here we show that this control cannot be performed by a quantum circuit if the unitary is completely unknown. However, this no-go theorem does not prevent implementing quantum control of unknown unitaries in practice, as any physical implementation of an unknown unitary provides additional information that makes the control possible. We then argue that one should extend the quantum circuit formalism to capture this possibility in a straightforward way. This is done by allowing unknown unitaries to be applied to subspaces and not only to subsystems.

One of the essential building blocks of classical computer programs is the "if" clause, which executes a subroutine depending on the value of a control variable. Similarly, several quantum algorithms rely on applying a unitary operation conditioned on the state of a control system. Here we show that this control cannot be performed by a quantum circuit if the unitary is completely unknown. However, this no-go theorem does not prevent implementing quantum control of unknown unitaries in practice, as any physical implementation of an unknown unitary provides additional information that makes the control possible. We then argue that one should extend the quantum circuit formalism to capture this possibility in a straightforward way. This is done by allowing unknown unitaries to be applied to subspaces and not only to subsystems.
Quantum computation harnesses quantum effects to significantly outperform classical computation in solving specific problems. The most widely used model for quantum computation -referred to as the quantum circuit model -is formulated in terms of wires, representing quantum systems, which connect boxes, representing unitary operations [1]. The formalism of quantum circuits is often considered as the standard language for describing quantum algorithms.
The difference between the classical and the quantum models of computation is not only in the computational complexity: quantum information processing differs in fundamental, and often counterintuitive, ways from classical computing. One of the most striking examples is the fact that it is impossible to produce a perfect copy of an unknown quantum state [2], whereas copying of classical information is a standard operation for classical computers.
Another standard operation in classical computer programs, usually expressed by an "if" clause, is the conditional execution of a part of the program depending on the value of a variable. A typical programming line of this kind has the form "if x = 0, do A", where A represents an arbitrary set of commands, i.e., a subroutine. Crucially, the construction of the if clause is independent of the subroutine A, allowing the latter to be used as a variable in the program.
The quantum analogue of the "if" clause is the control of a unitary operation U depending on the value of a control quantum bit (qubit). This is represented by the transformation where the subscript C stands for the control qubit and |ψ is the initial state of the target system. This control-U gate is a fundamental tool for quantum computa-tion. It is used for example in Kitaev's phase estimation algorithm [3], Shor's factoring [4], Metropolis sampling [5], and in the Determinstic Quantum Computing on One Qubit (DQC1) computing model [6].
The standard strategy to implement this gate in a quantum circuit is to decompose U into elementary gates, for which one knows how to add control [7]. This approach requires the unitary to be known, thus it cannot be used for solving problems in which the unitary itself is a variable. A genuine quantum analogue of the if clause would be an implementation of the control-U gate in which U can be treated as a blackbox. Although it has long been suspected that such a construction is impossible (e.g., it is mentioned en passant by Kitaev in Ref. [3]), no proof of this fact is known to the best of our knowledge.
Classically, the control can be achieved by encoding the operation to be controlled as a bit string in the input, in what is known as the "von Neumann" architecture, or a stored-program computer. In the quantum case, however, it is not possible to encode U as an input state, due to the no-programming theorem [8]; for this reason, computations in which U is a variable have to be considered as transformations of operations rather than states [9,10].
Here we prove a no-go theorem that states the impossibility of controlling an arbitrary unknown unitary in the quantum circuit model. The formal question is whether a quantum circuit can implement the control-U gate, given as input a single copy of the unknown d × d gate U. Thus we ask whether there exist unitaries A and B such that the following circuit identity is satisfied: where the topmost line represents an additional adimensional quantum system (ancilla) and W U is an arbitrary unitary on the ancilla, possibly depending on U. Note that the left hand side depicts the most general transformation that a quantum circuit can effect on U [11].
In order to see that the above identity cannot be satisfied, it is sufficient to notice that, in the lhs, substituting U with e iϕ U does not produce any physical difference, since the two circuits only differ by a global phase e iϕ . In contrast, the same substitution in the rhs produces a measurable relative phase.
Since the unitary U in the lhs is only defined up to a phase, it is only meaningful to ask whether a circuit can implement the control-U modulo this global phase. To translate this question into an equation, note that the matrix representation of the control-U operation is given by 1 d ⊕ U. Defining |U a := W U |0 a , the question is whether the identity holds for some arbitrary phase factor e iu , possibly depending on U. This is still not possible, due to the non-linearity of the transformation U → 1 d ⊕ e iu U. To see this, assume that equation (1) is valid for the qubit unitaries X, Z, and H = αX + βZ, where X and Z are Pauli matrices, and α, β are real numbers such that α 2 + β 2 = 1. One has then Expanding the lhs by linearity and using equation (1) again we get Taking the inner product with |H a in the ancilla subsystem gives us the equations α H|X e ix X + β H|Z e iz Z = e ih (αX + βZ).
Since X and Z are orthogonal, equation (4b) implies that H|X = e i(h−x) and H|Z = e i(h−z) . Substituting into the equation (4a) we get that Taking the modulus squared of the equation shows us that cos(x − z) = 0. Repeating these calculations for the matrices αX + βY and αY + βZ, we get also the conditions cos(x − y) = 0 and cos(y − z) = 0; but this is a contradiction, since there exist no angles x, y, and z such that This shows that one cannot control an arbitrary unknown unitary in the quantum circuit model. However, it leaves open the possibility of controlling unitaries belonging to known, specific sets. For example, if one eigenvector of U and its eigenvalue are known, there is a circuit that performs the control [3]. In a similar vein, if one knows that U belongs to a given set of orthogonal unitaries, it is also possible to control it [12].
Furthermore, it is possible to have quantum control over classical operations on classical inputs. To see this, we restrict the target system |ψ to be a classical bit string, i.e., to belong to the computational basis, and the unitary to be a classically allowed transformation U cl , i.e., a permutation matrix. Then the following circuit implements the control-U cl : where C represents a classical cloning operation (a controlled-NOT for a two-level system). The symbol • means that the operation is applied if the control bit is |1 and means that the operation is applied when the control bit is |0 . Note that, if cloning an arbitrary quantum state |ψ were possible, the circuit given above would allow one to control unknown quantum operations. This provides an alternative proof of the no-cloning theorem [2].
We will now show that, unlike for the no-cloning theorem, our no-go theorem does not prevent quantum control of unknown operations from being performed in practice. In fact, control of blackbox quantum gates has been experimentally demonstrated [13][14][15]. In order to illustrate how this is possible, we propose here a simple interferometric setup, depicted in Fig. 1, that exploits a similar idea, but implements the control-U operation in a very direct way.
Consider a single photon in the state (α|H C + β|V C )|ψ , where |H and |V represent horizontal and vertical polarization states of the photon and |ψ is the state of some other degree of freedom of the same photon (it could be its orbital angular momentum, a qudit of spatial or temporal bins, etc.). Let then U be a unitary gate acting on this additional degree of freedom. It is straightforward to check that the interferometer in Fig. 1 applies the transformation (α|H C + β|V C )|ψ → α|H C |ψ + β|V C U|ψ , (7) Figure 1. Interferometer that controls a qudit blackbox U.
Here the control qubit is the polarization of the photon, and U acts on some additional degree of freedom of the same photon. The PBSs are polarizing beam splitters. A photon with polarization |H takes the lower (red) path, while one with polarization |V takes the upper (blue) path.  This interferometer is not scalable, since the whole Hilbert space is encoded in a single photon. One can, however, generalize it to a scalable implementation of a controlled n-qubit unitary, in which each qubit is encoded in a different photon, as shown in Fig. 2.

PBS
How does this interferometric implementation circumvent the no-go theorem we have just proved? The crucial point is the difference between the unitary matrix U that appears in a quantum circuit, and the physical device that implements it in the interferometer U physical . While U is completely unknown, the position of the physical unitary is known, and therefore we know that it acts trivially on modes that do not pass through it. This knowledge is sufficient to control U, because when we extend the description of U to in-clude this trivial subspace, we see that it is represented as U physical = 1 d ⊕ U, which is the control-U gate.
To be more explicit, let {|0 , . . . , |d − 1 } be a basis spanning the space in which U acts, and {|r , |b } denote the red and blue paths. Then, in the basis {|r , |b } ⊗ {|0 , . . . , |d − 1 }, the physical operation is represented by which is exactly the matrix representation of the control-U gate. We stress again that U is still completely unknown, but the physical operation U physical is notsome of its eigenvalues are known -and therefore the theorem does not apply to it. This knowledge about a subspace in which the physical unitary acts trivially is not a particularity of this photonic implementation, but rather it must be present in any physical implementation of a quantum gate, since every physical operation acts non-trivially only on a limited region of space and time, limited number of electronic or nuclear levels, frequency modes, and so on.
In general, knowing that the physical implementation of a unitary U acts trivially on a d -dimensional subspace allows one to write it as 1 d ⊕ U; in fact, even a one-dimensional extension 1 ⊕ U allows one to implement a control-U using the scheme of Ref. [3], because one eigenvector and the corresponding eigenvalue of 1 ⊕ U are known. This is similar to the implicit knowledge that physical operations only act on a limited number of subsystems. In the quantum circuit model, this is taken into account by adding additional wires, which corresponds to the map U → 1 ⊗ U. Therefore, a natural way of accounting for the fact that physical operations act only on restricted subspaces would be to consider a generalized circuit model that allows extensions of the form U → 1 ⊕ U.
Our results have profound implications for quantum algorithms that rely on estimating properties of unknown unitaries. Taking into account the fact that unitaries can be applied to subspaces, it becomes possible to use algorithms such as DQC1 trace estimation [6] and Kitaev's phase estimation [3] with unknown unitaries, which would be impossible in the quantum circuit framework. Note that, however, Kitaev's algorithm is not efficient when used on blackboxes, since it must compute the unitaries U 2 k , and this requires an exponential amount of copies of U.
Furthermore, the scheme presented could also be used to simplify the implementation of the control-U gate even when the unitary in question is known, since adding control in the traditional way incurs in a constant overhead [7] that, while irrelevant in complexity theory, is usually important for physical implementations. One concrete example would be using the setup of Fig. 1 to approximate the Jones polynomial with DQC1 [16].
In conclusion, we have proved a no-go theorem that shows that an unknown arbitrary unitary cannot be controlled in a quantum circuit, even modulo a global phase. This control is, however, possible for any physical implementation of a unitary transformation. This shows that the language of quantum circuits should be extended in order to capture all information processing possibilities allowed by quantum physics. Other extensions of the quantum circuit formalism have been proposed, in which the wires between gates can be in a superposition [17][18][19]. Allowing for such "superpositions of circuits" can simplify the implementation of some information processing tasks [18,19], or even reduce the computational complexity of some problems [20]. It is an intriguing open question whether further extensions are possible [21].
After this work was submitted, we became aware that similar results were obtained independently by Akihito Soeda [22], and related work was developed by Thompson et al. [23].
We thank Alessandro Bisio, Jan-Åke Larsson, Amir Moqanaki, Daniel Nagaj, and Michal Sedlák for helpful discussions and an anonymous referee for valuable comments. This work was supported by the European Commission Project RAQUEL, the John Templeton Foundation, FQXi, and the Austrian Science Fund (FWF) through CoQuS, SFB FoQuS, and the Individual Project 2462.