Skip to main content
PLOS One logoLink to PLOS One
. 2011 Dec 28;6(12):e29417. doi: 10.1371/journal.pone.0029417

Interfacing External Quantum Devices to a Universal Quantum Computer

Antonio A Lagana 1,*, Max A Lohe 2, Lorenz von Smekal 3
Editor: Gerardo Adesso4
PMCID: PMC3247261  PMID: 22216276

Abstract

We present a scheme to use external quantum devices using the universal quantum computer previously constructed. We thereby show how the universal quantum computer can utilize networked quantum information resources to carry out local computations. Such information may come from specialized quantum devices or even from remote universal quantum computers. We show how to accomplish this by devising universal quantum computer programs that implement well known oracle based quantum algorithms, namely the Deutsch, Deutsch-Jozsa, and the Grover algorithms using external black-box quantum oracle devices. In the process, we demonstrate a method to map existing quantum algorithms onto the universal quantum computer.

Introduction

Quantum networks which connect quantum systems and can transmit quantum information have been extensively discussed [1]. Quantum connectivity provides a means of overcoming size-scaling and error-correction problems, and has significant advantages over classical connectivity. Furthermore, networks of quantum computers have also been proposed [2] where information can be exchanged between nodes via quantum and classical channels. A general question arises as to whether and how such quantum computers can communicate and exchange information. In the simplest case a quantum computer may download data sets from other nodes over the quantum network, but in more complex cases use the network to call subroutines, or concatenate programs from other quantum computers.

It is well known that classical principles do not necessarily apply in the realm of quantum mechanics. The no-cloning theorem (see [3] for example) is a well-known example of this. In the field of quantum computing, the ability to halt a programmable quantum computer was such an example. The original Universal Quantum Turing Machine proposal [4] made the tacit assumption that a quantum turing machine could be halted in a classical manner. This turned out to be problematic (see [5] for a discussion of the issues associated with the original proposal) due to properties of quantum mechanics. Thus, it is imperative to formally show whether a classical solution or property is applicable (or even relevant) in the realm of quantum mechanics. Assuming that a classical solution to a problem directly applies to a quantum mechanical system is prone to run into potential complications.

We address here the question of how a universal quantum computer can access an external oracle, which may be regarded as a “black box” quantum device, possibly over a quantum network but in any case as a separate and external quantum system to the universal quantum computer itself. In fact, the oracle may be a program running on a remote universal quantum computer. It should be noted that this is a different problem from that of implementing an oracle “program” on a universal quantum computer. This is of course possible by virtue of the fact that the computer is universal. Hence, if such a program exists, it can be implemented and executed on a universal quantum computer. Strictly speaking, however, the ability to utilize external quantum devices over a network connection is a different problem because such devices are external to the universal quantum computer itself.

Classically, the ability to access devices on a network is a well-known problem with well-known solutions. However, as stated earlier, we cannot assume that this is necessarily the case for a quantum computer accessing quantum devices on a quantum network. Our aim is to explicitly show that accessing external quantum devices with a universal quantum computer is indeed possible by devising universal quantum computer programs that implement well-known oracle based quantum algorithms, namely the Deutsch, Deutsch-Jozsa, and the Grover algorithms using external black-box quantum oracle devices.

In [5] we constructed a programmable universal quantum computer Inline graphic that is universal in the sense that it can emulate any classical Turing machine and can approximate any unitary operation to any desired accuracy. It is programmable in the sense that the machine's operations are specified using a sequence of instructions in the same way as for classical computers. Inline graphic also supports conditional branching and hence conditional execution, a feature that is not directly possible in the quantum gate array circuit framework. Moreover, Inline graphic uses a halting scheme that allows for valid program concatenation, thus resolving issues with the original Universal Quantum Turing Machine (UQTM) proposed by Deutsch [4].

In order to use information from a quantum network in Inline graphic programs, we need to devise a means of enabling Inline graphic programs to access such remote information and use that information for local computations. We assume that remote quantum nodes exist and treat them as black boxes without any assumptions as to their internal structure or operational details. Without loss of generality, we assume that such devices accept a finite number of input qubits and generate a finite number of output qubits. The input and output qubits may be shared, which is the case if the remote device functions in such a way as to alter the input qubits based on its function. We also assume, without loss of generality, that quantum network nodes have an “enable” qubit, Inline graphic, that controls when an access is to begin, in order to let the device know when the input data has been prepared and is valid. We further assume, without loss of generality, that the nodes of the network generate their output data in less time than the time associated with a single iteration of Inline graphic. If the query time were longer than a single iteration of Inline graphic or were data-dependent, one could simply write the Inline graphic program to wait for the appropriate number of cycles before using the result of the network access. Alternatively, the nodes could provide an “access completed” status flag qubit such that the Inline graphic program could poll this status flag qubit before using the result of a network access.

Results

Recall from [5] that Inline graphic consists of a memory tape Inline graphic with an infinite number of qubits, of which only a finite portion is ever used, and a processor that contains observables that play the roles of several registers, including a data register Inline graphic, a program counter register Inline graphic, a scratch qubit Inline graphic, and the halt qubit Inline graphic. The processor executes programs stored on the memory tape using data that is also stored on the memory tape. A program of Inline graphic consists of a sequence of qubits whose states encode instructions of the instruction set defined in [5] and reproduced in Table 1 at the end of this paper.

Table 1. Inline graphic Instruction Set.

Label Encoding Description
Inline graphic Inline graphic No operation
Inline graphic Inline graphic Inline graphic
Inline graphic Inline graphic Inline graphic
Inline graphic Inline graphic Inline graphic
Inline graphic Inline graphic Apply Hadamard operation to Inline graphic
Inline graphic Inline graphic Apply Inline graphic operation to Inline graphic
Inline graphic Inline graphic Inline graphic
Inline graphic Inline graphic Inline graphic of Inline graphic and Inline graphic (Inline graphic: control)
Inline graphic Inline graphic Inline graphic (branch) iff Inline graphic
Inline graphic Inline graphic Clear Inline graphic
Inline graphic Inline graphic Inline graphic (set halt qubit)

The single qubit operations Inline graphic and Inline graphic act on the qubit at tape location Inline graphic, denoted Inline graphic, and the two qubit operations Inline graphic and Inline graphic act on Inline graphic and the scratch qubit Inline graphic, the latter being used as the control qubit for the Inline graphic operation.

The instruction set includes a set of operations that can approximate any unitary operation to any desired accuracy. Thus, it is quantum computationally universal. In [5] we constructed a Inline graphic program that can compute the Inline graphic function, thereby showing that the machine can compute any classically computable function. Because of Inline graphic's universality, any algorithm that can be implemented in the quantum gate array framework can be mapped to an equivalent Inline graphic program by virtue of the fact that gate array circuits can be decomposed into circuits of gates with the same universal set of unitary operations Inline graphic that are implemented in the Inline graphic instruction set. Each of the qubits in a quantum circuit (i.e. lines connecting gates) can be mapped to a suitable memory tape data qubit and each of the unitary operations (i.e. quantum gates) can be mapped to a suitable Inline graphic subroutine. It is possible therefore to map quantum gate array implementations of algorithms such as the quantum Fourier transform, quantum phase estimation, quantum order finding, quantum factoring discussed in [6] (Chapter 5) onto Inline graphic.

Accessing Networked Quantum Resources With Inline graphic

Modifying Inline graphic to use networked quantum devices, then, is a matter of connecting the qubits comprising the interface (input, output, enable, and optionally access complete) qubits of those devices to a finite subset of the data portion of Inline graphic, which is the quantum analog of a classical computer's memory-mapped I/O and allows Inline graphic programs to access remote devices using the Inline graphic qubits that are connected to those devices. The Inline graphic programs prepare the appropriate input data qubits, set the corresponding access enable qubits to perform an access, and utilize the corresponding output data qubits of Inline graphic. It should be noted that a remote quantum device could be another instance of Inline graphic which would enable distributed quantum computing. However, the scheme to access data from remote devices, be they simple devices or full-fledged quantum computers, would work in the same way.

Primitive Programs

In [5] we defined several primitive programs and subroutines that serve as building blocks for devising and analyzing more complicated and useful programs. We reproduce here only those that we specifically require for constructing the algorithms that are the focus of this work. By considering the quantum gate array framework implementations of the algorithms, we identify that we need programs that perform the operations Inline graphic, Inline graphic, and Inline graphic. We also need to swap qubits for several operations such as enabling or disabling the remote networked quantum device, and the ability to address individual qubits on the memory tape to perform operations on them. Finally, we need a primitive program to halt the overall program.

In the equations that follow, superscripts on programs denote the operation specified by the program and subscripts indicate the qubits on which the program specifies the processor to operate upon. For notational simplicity, Inline graphic denotes the program that halts Inline graphic, i.e. Inline graphic.

The first set of primitive programs, Inline graphic, is a subset of those defined in [5]:

1. Inline graphic: Increment Inline graphic by Inline graphic,

graphic file with name pone.0029417.e091.jpg (1)

2. Inline graphic: Set Inline graphic to Inline graphic, Inline graphic,

graphic file with name pone.0029417.e096.jpg (2)

Recall from the discussion of Inline graphic in [5], that we precede the Inline graphic instruction with a Inline graphic instruction to ensure that Inline graphic when the Inline graphic instruction is executed.

3. Inline graphic: Swap data qubits Inline graphic and Inline graphic,

graphic file with name pone.0029417.e105.jpg (3)

4. Inline graphic: Swap data qubits Inline graphic and Inline graphic,

graphic file with name pone.0029417.e109.jpg (4)

We also describe the set of programs Inline graphic which apply the single- and multiple-qubit Inline graphic and Inline graphic operations on arbitrary qubits on the memory tape, where Inline graphic and Inline graphic:

1. Inline graphic: Apply Inline graphic to data qubit Inline graphic,

graphic file with name pone.0029417.e118.jpg (5)

2. Inline graphic: Apply Inline graphic to data qubits Inline graphic, where Inline graphic,

graphic file with name pone.0029417.e123.jpg (6)

One could implement this program using a loop but that would require first implementing binary addition of Inline graphic qubits. Binary addition is possible because one can implement a binary adder such as a Carry Lookahead Adder (CLA) [7] using the Inline graphic program that we defined in [5]. However, since we are only interested in a polynomial order (in the number of qubits) multiple qubit Hadamard transformation program, we define Inline graphic as a sequential “unrolled” loop program.

3. Inline graphic: Apply Inline graphic to data qubits Inline graphic and Inline graphic with Inline graphic as the control qubit,

graphic file with name pone.0029417.e132.jpg (7)

Using the primitive programs defined above, we define Inline graphic as the program that applies the Inline graphic (Inline graphic) operation on data qubit Inline graphic. Noting that a Inline graphic operation with the control qubit in the Inline graphic state is equivalent to the Inline graphic operation, we deduce the equivalence

graphic file with name pone.0029417.e140.jpg (8)

where the subscript Inline graphic denotes that some suitable data qubit on the memory tape has been prepared in the state Inline graphic. Similarly, we define Inline graphic as the program that applies the Inline graphic (Inline graphic) operation on data qubit Inline graphic. Noting that Inline graphic, we deduce

graphic file with name pone.0029417.e148.jpg (9)

Finally, we define a program Inline graphic that conditionally applies the Inline graphic operation on data qubit Inline graphic and data qubit Inline graphic. Since Inline graphic is the conditional Inline graphic operation, we have

graphic file with name pone.0029417.e155.jpg (10)

Inline graphic Algorithms Using Networked Quantum Oracle Devices

With the notable exception of Shor's factorization algorithm [8], several well known quantum algorithms that achieve a speed-up over their fastest known classical counterparts rely on the use of an oracle, the best known examples being the Deutsch, Deutsch-Jozsa, and Grover algorithms (see Nielsen and Chuang [6], for example). The Deutsch algorithm can determine a global property of a function Inline graphic, namely Inline graphic, using only one evaluation of Inline graphic whereas the fastest classical algorithm requires at least two evaluations of Inline graphic. The Deutsch-Jozsa algorithm can determine whether a two-valued (0 or 1) function Inline graphic is constant or balanced with only one evaluation of Inline graphic whereas the fastest classical algorithm requires Inline graphic evaluations, where Inline graphic denotes the number of bits required to encode the possible values of Inline graphic. Grover's algorithm [9] can find a marked item in an unstructured database of Inline graphic elements in Inline graphic operations whereas the fastest classical algorithm requires Inline graphic operations. Thus, these quantum algorithms all achieve at least a quadratic speedup over their classical counterparts.

These algorithms are well suited to illustrate the use of networked quantum resources with the Inline graphic because they rely on black-box quantum devices that generate some output based on the given input. They thus serve as prototypical examples of a networked quantum node, whose internal implementation details are unknown; only the interface protocol need be known. Here, we assume the simplest protocol, which is that the output is valid one “clock cycle” after making a request.

Deutsch and Deutsch-Jozsa Algorithms on Inline graphic

We now illustrate the use of a networked quantum device in a Inline graphic program by first implementing the simplest known oracle based quantum algorithm, Deutsch's algorithm. The Deutsch oracle works as follows:

graphic file with name pone.0029417.e172.jpg

where Inline graphic is some function and Inline graphic denotes the oracle query enable flag. The memory tape is prepared with Inline graphic and Inline graphic where Inline graphic and Inline graphic take the roles of Inline graphic and Inline graphic, respectively. We assume without loss of generality that Inline graphic takes the role of Inline graphic and is prepared as Inline graphic, and Inline graphic is initially prepared as Inline graphic.

The program that executes the Deutsch algorithm is

graphic file with name pone.0029417.e186.jpg (11)

where Inline graphic applies the Hadamard transform to the data qubits corresponding to Inline graphic and Inline graphic. Inline graphic swap qubits Inline graphic and Inline graphic thereby setting the oracle's Inline graphic qubit (recall that Inline graphic is connected to Inline graphic and that Inline graphic and Inline graphic initially) for a single Inline graphic cycle and then clears it, returning the state of Inline graphic back to the original state. At this point, the oracle has generated the output state Inline graphic. Inline graphic then applies the Hadamard transform to the Inline graphic output of the oracle and Inline graphic halts the program thus yielding the following on the memory tape:

graphic file with name pone.0029417.e204.jpg

Measuring Inline graphic yields the result that we were interested in, Inline graphic. This is a specific mapping of the gate array implementation of the algorithm (see [6] Figure 1.19, for example) onto the instruction set of Inline graphic.

We can similarly implement the Deutsch-Jozsa algorithm by mapping a gate array implementation such as the one shown in [6], Figure 1.20. In this case, data qubits Inline graphic take the role of Inline graphic, Inline graphic takes the role of Inline graphic, and we use Inline graphic as the Inline graphic qubit. As before, Inline graphic are prepared in the Inline graphic state, Inline graphic is prepared in the Inline graphic state, Inline graphic is prepared in the Inline graphic state and Inline graphic is prepared in the Inline graphic state. The Deutsch-Jozsa oracle works like the Deutsch oracle with the only difference being that Inline graphic is Inline graphic qubits wide. The resulting Inline graphic program that computes the Deutsch-Jozsa algorithm is therefore

graphic file with name pone.0029417.e225.jpg (12)

which is again a direct mapping of the gate array implementation onto the Inline graphic instruction set.

Grover's Algorithm on Inline graphic

We now use the techniques developed in the previous section to implement the Grover unstructured database search algorithm. We assume that the database has only one marked solution as can be determined by using the quantum counting algorithm (see [6] Chapter 6, for example). We denote the query data qubits as Inline graphic and the query enable flag as Inline graphic. The Grover oracle works as follows:

graphic file with name pone.0029417.e230.jpg

where Inline graphic if Inline graphic is a solution to the search problem and Inline graphic otherwise. More concisely, the oracle performs the unitary transformation

graphic file with name pone.0029417.e234.jpg (13)

where Inline graphic denotes the marked solution. In other words, the oracle flips the phase of the solution state but leaves non-solution states unchanged. Grover's algorithm prepares an initial query state as the equal superposition of all elements in the database, followed by Inline graphic iterations of Inline graphic, where

graphic file with name pone.0029417.e238.jpg (14)

and

graphic file with name pone.0029417.e239.jpg (15)

denotes the equal superposition of all database elements.

Thus, the first step in the program is to create a superposition of all database items in Inline graphic where Inline graphic, Inline graphic, as the first query input. This is accomplished by the multiple qubit Hadamard primitive program Inline graphic defined in Eq. (6). The next step is to perform an oracle query. The following program performs an oracle call with query data prepared in Inline graphic:

graphic file with name pone.0029417.e245.jpg (16)

where Inline graphic is used as the oracle query enable qubit and Inline graphic is initialized to Inline graphic. Inline graphic is assumed to be initialized to Inline graphic (i.e. the oracle query data is disabled at start-up). This program simply sets the query enable qubit for a single Inline graphic cycle and then clears it, returning the state of Inline graphic back to the original state. Thus, upon running Inline graphic, the result of the oracle call is in Inline graphic, i.e. this program is functionally equivalent to Inline graphic.

The next step is to implement a program Inline graphic that performs the reflection of a given state about the superposition of all basis states Inline graphic. This requires a conditional-phase operation that works as follows:

graphic file with name pone.0029417.e258.jpg

where Inline graphic is Inline graphic qubits wide. Up to a global phase, this can be implemented using the following procedure:

1. Apply the Inline graphic operation to all Inline graphic qubits.

2. Apply a controlled-Inline graphic operation using Inline graphic qubits as control qubits and the remaining qubit as the data qubit.

3. Apply the Inline graphic operation to all Inline graphic qubits.

We can construct a multiple qubit controlled-Inline graphic program Inline graphic where qubits Inline graphic through Inline graphic are the control qubits and qubit Inline graphic is the data qubit, with the Inline graphic program defined in Eq. (10) and the Toffoli program Inline graphic that we defined in [5] using a procedure analogous to that described in [6], Chapter 4. Armed with Inline graphic, we construct Inline graphic as follows:

graphic file with name pone.0029417.e276.jpg (17)

It can be readily verified that this is functionally equivalent to the Inline graphic operator. Thus, a program that performs a single Grover iteration is

graphic file with name pone.0029417.e278.jpg (18)

In summary, the complete program to search a database of Inline graphic items with a single marked solution is

graphic file with name pone.0029417.e280.jpg (19)

where Inline graphic is the number of Grover iterations that can be pre-computed based on the database size, or that Inline graphic can compute from the database size using a classical algorithm. Upon execution of Inline graphic, a measurement of Inline graphic reveals the solution Inline graphic. Because there are no oracle queries associated with Inline graphic and Inline graphic, we immediately identify the complexity (as a measure of the number of oracle queries) of Inline graphic as Inline graphic. As is to be expected, this complexity is identical to the number of oracle queries associated with an implementation in the gate array framework.

Discussion

We have presented a scheme to allow universal quantum computers to utilize networked quantum resources. We have illustrated the scheme by devising Inline graphic programs that implement the well-known oracle based Deutsch, Deutsch-Jozsa, and Grover algorithms using networked quantum oracle devices. We have therefore demonstrated that universal quantum computers can access networked quantum devices in a way analogous to that by which classical computers access network resources. The method that we used to map quantum algorithms onto Inline graphic can be applied to implement and analyze other quantum algorithms.

Footnotes

Competing Interests: The authors have declared that no competing interests exist.

Funding: The authors have no funding or support to report.

References

  • 1.Kimble HJ. The quantum internet. Nature. 2008;453:1023–1030. doi: 10.1038/nature07127. [DOI] [PubMed] [Google Scholar]
  • 2.Curcic T, Filipkowski ME, Chtchelkanova A, D'Ambrosio PA, Wolf SA, et al. Quantum networks: from quantum cryptography to quantum architecture. SIGCOMM Comput Commun Rev. 2004;34:3–8. [Google Scholar]
  • 3.Griffiths DJ. Pearson Education Inc., second edition; 2005. Introduction To Quantum Mechanics. [Google Scholar]
  • 4.Deutsch D. The church-turing principle and the universal quantum computer. Proc R Soc London. 1985;400:97–117. [Google Scholar]
  • 5.Lagana AA, Lohe MA, von Smekal L. Construction of a universal quantum computer. Phys Rev A. 2009;79:052322. doi: 10.1371/journal.pone.0029417. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Nielsen MA, Chuang IL. Cambridge University Press; 2000. Quantum Computation and Quantum Information. [Google Scholar]
  • 7.Waser S, Flynn MJ. Holt, Reinhart and Winston; 1982. Introduction To Arithmetic for Digital Systems Designers. [Google Scholar]
  • 8.Goldwasser S, editor. IEEE Computer Society; 1994. Proceedings of the 35th Annual Symposium on the Foundations of Computer Science. [Google Scholar]
  • 9.Grover LK. Quantum mechanics helps in searching for a needle in a haystack. Phys Rev Lett. 1997;79:325–328. [Google Scholar]

Articles from PLoS ONE are provided here courtesy of PLOS

RESOURCES