Classical emulation of a quantum computer

This paper describes a novel approach to emulate a universal quantum computer with a wholly classical system, one that uses a signal of bounded duration and amplitude to represent an arbitrary quantum state. The signal may be of any modality (e.g. acoustic, electromagnetic, etc.) but this paper will focus on electronic signals. Individual qubits are represented by in-phase and quadrature sinusoidal signals, while unitary gate operations are performed using simple analog electronic circuit devices. In this manner, the Hilbert space structure of a multi-qubit quantum state, as well as a universal set of gate operations, may be fully emulated classically. Results from a programmable prototype system are presented and discussed.


Introduction
In 1980, Paul Benio®¯rst introduced the concept of a quantum computer by demonstrating that a closed quantum system could be used to model the general process of computation. 1 The idea was later formalized by David Deutsch through the concept of a universal quantum computer as a generalization of a classical Turing machine. 2 Nearly a decade later, Peter Shor demonstrated that quantum computers could be used to factor large numbers more e±ciently than any known classical algorithm and such devices could be designed with fault tolerance. 3,4 Quantum computers thereby o®er a challenge to the strong Church-Turing thesis that one can do no better than a classical Turing machine. 5,6 This paper examines the nature of this presumed \quantum speedup" and whether, by broadening our notion of a classical computer, one may in fact emulate and exploit it.
is the tensor product. A single element of one of the n constituent Hilbert spaces constitutes a qubit. The speci¯cation of an inner product hj i between states ji and j i in H completes the Hilbert space description.
We shall denote by j0i i and j1i i , a pair of orthonormal basis states, termed the computational basis, for H i and i 2 f0; . . . ; n À 1g. Taking tensor products of these individual basis states, we obtain a set of 2 n orthonormal basis states for the product space, H. A particular binary sequence x 0 ; . . . ; x nÀ1 therefore corresponds to a single basis state jx nÀ1 i nÀ1 Á Á Á jx 0 i 0 . For brevity, this binary sequence may be represented by its decimal form, x ¼ x 0 2 0 þ Á Á Á þ x nÀ1 2 nÀ1 2 f0; . . . ; 2 n À 1g, so that the corresponding basis state may be written succinctly as jxi or, more explicitly, as jx nÀ1 ; . . . ; x 0 i. Let hxj i ¼ x 2 C for a given state j i 2 H and basis state jxi. This state may then be written

Signal-based representation
A key concept in our classical representation of a quantum state is the notion of inphase and quadrature signals, which may be used to encode two distinct signals within one signal. Suppose we have a complex number ¼ a þ jb with a; b 2 R. Physically, the real and imaginary values may be represented by, say, a pair of distinct direct current (DC) voltages. It is also possible to encode them in a single alternating current (AC) voltage signal sðtÞ of carrier frequency ! c > 0 such that Given sðtÞ, the parameters a and b can be recovered by the following procedure. First, we split or \clone" the signal into two copies, which can be done classically, and then multiply each by 2 cosð! c tÞ and À2 sinð! c tÞ, respectively, to obtain Multiplication by the quadrature components thus creates signals at the sum and di®erence frequencies 2! c and 0 (i.e. DC). Low-pass¯ltering these two signals, then, yields the coe±cients a and b, as desired. A similar approach may be used to encode two complex numbers and , and hence a single qubit, using the complex quadrature signals e j! 0 t and e Àj! 0 t . Physically such a choice would, again, correspond to using two distinct real signals, each representing the real and imaginary parts, to realize the complex signal. With this \dual rail" representation, the corresponding complex signal is given by As before, the coe±cients and may be recovered (as pairs of DC voltages) by multiplying copies of ðtÞ by e Àj! 0 t and e j! 0 t , respectively, and then low-pass¯ltering. Note that multiplication, in this case, is complex multiplication between two dual-rail signals, which results in a dual-rail output. More generally, we may identify the single-qubit basis states j0i i and j1i i , for qubit i, with the basis functions ! i 0 and ! i 1 , where ! i 0 ðtÞ ¼ e j! i t and ! i 1 ðtÞ ¼ e Àj! i t are the in-phase and quadrature signals, respectively. For n qubits, the basis state jxi is represented by the basis signal x composed of a product of n single-qubit signals as follows: where ! i 0 ðtÞ and ! i 1 ðtÞ are de¯ned above. Thus, function multiplication serves as a tensor product between qubits. Unlike the Kronecker product of matrices, though, the order is unimportant, as the qubits are distinguished by their distinct frequencies.
Note that the spectrum of x will consist of the 2 n sums and di®erences of the n component frequencies, which represent the Hilbert space. We refer to this description as the quadrature modulated tonals (QMT) representation.
By way of convention, we take 0 < ! 0 < Á Á Á < ! nÀ1 , where ! i ¼ 2 i ! 0 , and refer to this as the octave spacing scheme. The quantum state j i can now be represented as a complex, n-qubit signal which, at time t, is given by For two such signals and , the inner product is de¯ned to be where T is a multiple of the period 2=! 0 of the signal. Note that the inner product corresponds to a low-pass¯lter, and h x j i ¼ x represents a pair of DC values giving the components of the quantum state for the jxi basis state. This completes the Hilbert space description, thereby demonstrating the mathematical equivalence of this representation to that of a true multi-qubit quantum system.

Gate operations
In our approach, subspace projections are used for performing gate operations. Given a quantum state j i 2 H, we can mathematically decompose it into the two orthogonal subspaces corresponding to, say, qubit i as follows: where j ðiÞ 0 i and j ðiÞ 1 i are the ðn À 1Þ-qubit partial projection states.
A linear gate operation on a single qubit may be represented by a complex 2 Â 2 matrix U , where If U acts on qubit i of state j i, then the transformed state is Thus, the gate operation is applied only to the addressed qubit basis states, not to the partial projections. This, of course, is only a mathematical operation. A physical method of construction is needed to realize the transformation.
In our QMT representation, a pair of complex signals i is produced by taking the initial complex signal ðtÞ, multiplying copies of it by ! i 0 ðtÞ and ! i 1 ðtÞ, respectively, and passing them through a pair of specialized band-pass¯lters that output the desired projection signals. 14 Given this pair of complex signals, along with the complex, single-qubit basis signals ! i 0 ðtÞ and ! i 1 ðtÞ, we may construct the transformed signal 0 ðtÞ using analog multiplication and addition operations as follows: Two-qubit gate operations, such as Controlled NOT (CNOT) gates, may be constructed similarly. Importantly, this approach to performing gate operations requires only a single subspace decomposition of the original signal into two constituent signals and does not require a full spectral decomposition, as would be required if one were performing an explicit matrix multiplication operation over the entire 2 n -component state. This approach provides a signi¯cant practical advantage to implementation and more closely emulates the intrinsic parallelism of a true quantum system.

Measurement gates
The procedure for performing measurements is quite similar to that for performing gate operations. To perform a measurement on, say, qubit i, we construct the partial projection signals ðiÞ 0 ðtÞ and ðiÞ 1 ðtÞ, as before, and measure their root-mean-square (RMS) values, given by This can be done more easily by adding the real and imaginary parts of, say, , and these probabilities may be computed explicitly through analog sum and division operations. For each such qubit measurement, a random input DC voltage representing a random number u i , chosen uniformly in the interval ½0; 1, may be input to a comparator device such that when u i > p ðiÞ 0 , a binary outcome of 1 is obtained with a probability given by the Born rule.
To measure a second qubit, the same procedure is followed but using the (unnormalized) \collapsed" state Å ðiÞ 0 j i or Å ðiÞ 1 j i, depending upon whether outcome 0 or 1, respectively, was obtained in the¯rst measurement. The selection of the collapsed state may be implemented through a simple switch controlled by the binary measurement output. This procedure may be repeated until all n qubits are measured. Doing so results in an n-bit digital output whose distribution follows the quantum mechanical predictions, at least to the limits of hardware¯delity.

Hardware Implementation
We have implemented in hardware a device capable of initializing the system into an arbitrary two-qubit state and operating one of a universal set of gate operations. A picture of the current hardware setup is shown in Fig. 1. We use a signal generator to produce a baseline 1000 Hz tonal, from which all other signals are generated and thereby phase coherent. The lower frequency qubit, labeled B, is taken from the signal generator, with a separate, 90 phase-shifted signal used to represent the imaginary component. The higher frequency qubit, labeled A, is derived from qubit-B via complex multiplication, which results in frequency doubling. Thus, ! A ¼ 2ð2000 HzÞ and ! B ¼ 2ð1000 HzÞ. The two single-qubit signals are multiplied to produce the four basis signals 00 ðtÞ ¼ e jð! A þ! B Þt , 01 ðtÞ ¼ e jð! A À! B Þt , 10 ðtÞ ¼ e jðÀ! A þ! B Þt , and Fig. 1. Photograph of the current hardware setup. The three breadboards correspond to basis signal generation (left), state synthesis (center) and gate operations (right). The devices in the background are an oscilloscope (left), a signal generator (center) and a DC power supply (right). The electronics are interfaced via a desktop computer (to the left, not shown). 11 ðtÞ ¼ e jðÀ! A À! B Þt centered at frequencies þ3000 Hz, þ1000 Hz, À1000 Hz, and À3000 Hz, respectively.
State synthesis is performed by multiplying these four basis signals by four complex coe±cients 00 , 01 , 10 and 11 , each represented by pairs of DC voltages, and adding the results to produce the¯nal, synthesized signal ðtÞ representing the quantum state j i. An example of a synthesized signal is given in Fig. 2, which shows the ideal pair of signals, representing the real and imaginary parts of ðtÞ, and the recorded signals generated in the hardware. In this example, the state is speci¯ed by the complex coe±cients 00 ¼ 0:6579 À 0:2895j, 01 ¼ 0:5385 þ 0:1383j, 10 ¼ À0:2280 þ 0:3953j and 11 ¼ À0:2460 À 0:4277j.
To implement gate operations, we use a set of analog four-quadrant multipliers, lters and operational ampli¯ers to realize the mathematical operations described previously. For example, to perform a gate operation on qubit-A we use a pair of low-pass¯lters to remove the 2000 Hz component from e AEj! A t ðtÞ. The resulting partial and use it to construct two qubit-A signals of the form U 00 e j! A t þ U 10 e Àj! A t and U 01 e j! A t þ U 11 e Àj! A t . These, in turn, are multiplied by the corresponding partial projections and added to form the¯nal signal 0 ðtÞ, given by 0 ðtÞ ¼ ðU 00 e j! A t þ U 10 e Àj! A t Þ ðAÞ 0 ðtÞ þ ðU 10 e j! A t þ U 11 e Àj! A t Þ ðAÞ 1 ðtÞ: The resulting output using the gate speci¯ed in Eq. (14) applied to the signal in Fig. 2 is shown in Fig. 3.

Fidelity Analysis
The quality of a quantum state or gate operation is typically measured in terms of the gate¯delity, which is a number between 0 and 1, where 1 is ideal. For an ideal state j i and recorded state j^ i, the¯delity is Using this de¯nition, we can measure the¯delity of a state synthesis or gate operation over an ensemble of random realizations.
As an illustration, we performed synthesis of the entangled singlet state j i ¼ ½j01i À j10i= ffiffi ffi 2 p and examined the¯delity of the signal used to emulate this state (just prior to performing a gate operation on it). Using Eq. (16), we compared the ideal quantum state to the actual signal, using the recorded signal to compute the inner product h^ j i and the normalization jj^ jj. Figure 4 shows the results of this analysis, where a histogram of¯delity over 500 realizations of the emulated signal is shown. In this example, we¯nd a mean state¯delity of 0:991 % 99%.
The de¯nition of¯delity given by Eq. (16) assumes a pure initial and¯nal state; in general, the states may be mixed. A mixed state may be thought of as a random ensemble of pure states; for n-qubit states a mixed state may be represented by a 2 n Â 2 n positive semi-de¯nite matrix . In our classical emulation, a single pure state is always realized and can be known, but in a true quantum system this is not so. Instead, one must infer the quantum state through a variety of measurements. One widely accepted approach uses quantum state tomography (QST) to estimate the quantum state from a complete set of orthonormal measurements. In our case, we use the 16 pair-combinations of four Pauli spin matrices, normalized to unity with respect to the Hilbert-Schmidt inner product. 17 To fairly compare our system with a true quantum system, then, we can also perform QST to obtain an estimated The input signal is that shown in Fig. 2, and the gate, operating on qubit-A, is given by Eq. (14).
quantum state and thereby compute the¯delity compared to the ideal quantum state ¼ j ih j using the formula 18 To perform such measurements, we take the \bare" pure state and form an ensemble of \dressed" states by rescaling the signal and adding a random noise term. Thus, if ® 2 C 2 n speci¯es the bare pure state, then the dressed state is given by a ¼ s® þ º, where s ¼ ffiffi ffi 2 p À 1, º ¼ z=jjzjj, and z is a standard complex Gaussian. Using these dressed states, a series of measurements are performed using amplitude threshold crossings of projections onto the basis states of the observables in a manner described elsewhere. 16,19 These measurement outcomes are then used in a maximum likelihood QST method to obtain the estimated quantum state 0 and, from this, the measured¯delity F ð 0 ; Þ. 20 For the ideal singlet state and a sample size of 1000, for example, we obtained a measured¯delity of about 0:998 % 99%, comparable to what was found earlier through a direct calculation of F ð 0 ; Þ.
A similar technique was used to measure gate¯delity. Given a pure singlet state, we applied a random ensemble of unitary gates on qubit-A. For each realization of a gate U , the ideal quantum state is j 0 i ¼ Uj i. If we denote the recorded state by^ 0 , then the gate¯delity will be F ð^ 0 ; 0 Þ. The results for this example are summarized in

Practical Considerations
The device as currently implemented is limited to two qubits. Additional qubits are straightforward to implement but require additional bandwidth that scales exponentially with the number of qubits. The complexity of the¯lters needed to perform the subspace projection operations increases similarly. Using current integrated circuit technology, a device of up to 20 qubits could easily¯t on single chip, while 40 qubits would seem to be a practical upper limit. 14 Current development e®orts are focused on building a set of programmable oneand two-qubit gates. Once these are completed, we will have the ability to initialize an emulated quantum state and operate on it with a programmable sequence of universal gates to execute any particular quantum computing algorithm. Future work will focus on scaling up the number of qubits and migrating from a simple breadboard setup to a more sophisticated, chip-based implementation. Classical error sources, such as additive noise, can be modeled as a quantum operations, such as a depolarizing channel, and will be the subject of future investigations. We envision a device based on the concepts described above that would interface with a traditional digital computer and serve as an analog co-processor, much as is done in our current prototype. Thus, a digital computer, tasked with solving a particular problem, perhaps as a subroutine to a larger computation, would designate an initial quantum state and sequence of gate operations to be performed on this state through a digital-to-analog converter (DAC) interface. The co-processor would produce a¯nal state (i.e. a signal) which would then be subject to a sequence of measurement gate operations. The result would be a particular binary outcome, which would then be reported back to the digital computer via an analog-to-digital (A/D) converter.
The price paid for the computational e±ciency of the analog co-processor lies in the hardware complexity needed to implement the device. Each single-qubit projection operation on an n-qubit state requires a pair of distinct, comb-like¯lters with 2 n =4 (positive) pass-band frequencies, while each two-qubit operation requires the ability to perform nðn À 1Þ di®erent projection operations. A key part of the development for a larger scale device would consist of the design of tunable band-pass lters with multiple nulls for the subspace projection operations. The number of qubits will also be limited by the available bandwidth and the lowest frequency ! 0 (or period T ) of the signal. Under the octave spacing scheme, n qubits would require a frequency band from ! 0 to 2 n ! 0 . Each gate operation would require a time OðT Þ to complete, and any useful algorithm would have a number of gates that grows only polynomially in n. Thus, for a base qubit frequency of, say, 1 MHz, a single gate operation acting simultaneously on all 2 10 digital states of a 10qubit signal would take about T ¼ 1 s. If we compare this to a nominal single-core, 1 GHz digital processor, the time to process all N ¼ 2 10 $ 10 6 inputs would also be about 1 s. Thus, a mere 10 qubits would give a processing step-time comparable to that of a modern digital processor.

Conclusions
The power of quantum computing lies ultimately in the ability to operate coherently on arbitrary superpositions of qubits representing the quantum state. We have shown that the fundamental mathematics of gate-based quantum computing can easily be represented classically, and practically implemented electronically. Thus, in all ways such as device is capable of faithfully emulating a truly quantum system, albeit one of limited scale. This has importance both from a foundational and practical perspective. Foundationally, the work we have described here serves to illustrate that many aspects of quantum computing thought to be both important to its e±cacy and uniquely quantum in nature can, in fact, be emulated in an entirely classical manner. Practically, we have shown that by leveraging the concepts of quantum computing and applying them to classical analog systems, one can construct a relatively smallscale device that would actually be competitive with current state-of-the-art digital technology.