{'fraction_non_alphanumeric': 0.03570400230348402, 'fraction_numerical': 0.013604952490642096, 'mean_word_length': 4.620145631067961, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Implementation of a Deutsch-like quantum algorithm utilizing entanglement at the two-qubit level, on an NMR quantum information processor

We describe the experimental implementation of a recently proposed quantum algorithm involving quantum entanglement at the level of two qubits using NMR. The algorithm solves a generalisation of the Deutsch problem and distinguishes between even and odd functions using fewer function calls than is possible classically. The manipulation of entangled states of the two qubits is essential here, unlike the Deutsch-Jozsa algorithm and the Grover's search algorithm for two bits.

We describe the experimental implementation of a recently proposed quantum algorithm involving quantum entanglement at the level of two qubits using NMR. The algorithm solves a generalisation of the Deutsch problem and distinguishes between even and odd functions using fewer function calls than is possible classically. The manipulation of entangled states of the two qubits is essential here, unlike the Deutsch-Jozsa algorithm and the Grover's search algorithm for two bits.
Early on, Deutsch and Jozsa presented a simple problem to determine whether a Boolean function f is constant or balanced [2]. Classically, the algorithm requires many function calls to solve the problem without error, but a quantum computer can solve the problem using only a single function call. The Cleve version of the algorithm used an extra qubit to encode the required unitary transformations and the solution could be read out as the relative phase of the qubits [3]. Recently, the Deutsch-Jozsa (DJ) problem was modified and implemented using a lesser number of input qubits [25][26][27], and interest continues in further generalisations of the DJ problem [28]. It was realised that, for upto two bits the DJ problem need not invoke entangling transformations for its solution. The problem thus allows a classical description for the two-qubit case, and it is only for three or more qubits that the quantum nature of the algorithm is displayed [25,26]. As pointed out recently by Seth Lloyd [29], Grover's search algorithm for two qubits also does not require entangling transformations. Hence both these algorithms become truly quantum only for three or more qubits.
A quantum algorithm to distinguish between even and odd functions using fewer function calls than a classical algorithm has been recently designed [30]. The algorithm uses entangling transformations at the two-qubit level itself and is an interesting example of the power of a quantum computer over corresponding classical systems. In this paper, we present the experimental implementation of the algorithm on a two-qubit NMR quantum computer. The requisite unitary transformations have been implemented using spin-selective and compositez pulses. A judicious combination of composite pulses and evolution under the scalar coupling Hamiltonian has been used to construct the desired entangling transformations. The algorithm requires distinguishing between non-orthogonal states of the two qubits in order to classify the functions [32]. In our NMR implementation, such a distinction is achieved in a single measurement. The algorithm to evaluate the even or odd nature of a function uses entangling transformations for its implementation on two input qubits. Entangling transformations can produce entangled states that have no classical analogue [31].
Consider a Boolean function defined from a twobit domain space to a one-bit range space: f (x) : {0, 1} 2 → {0, 1}. There are four possible input values (00), (01), (10) and (11), the output for each of these being either 0 or 1. The 16 possible functions can be divided into sub-classes based on the number of ones and zeros in their outputs. The functions can be categorised in the sub-classes [0, 4], [1,3], [2,2], [3,1], or [4,0], where the first entry indicates the number of ones and the second indicates the number of zeros in the output. The functions with an even number of ones in the output (the functions belonging to the categories [0, 4], [2,2] and [4,0]) are denoted "even" functions while the functions with an odd number of ones in the output (the [1,3] and [3,1] functions) are said to be "odd" functions. For the two-qubit case, we thus have 8 even and 8 odd functions.
Classically, the classification of a function as even or odd would require computing it at all input points. The quantum algorithm constructed uses just two function calls to evaluate the even or odd character of the given function [30]. The implementation requires a quantum gate to call the function, and a judicious use of pseudo-Hadamard transformations (on both qubits, and selec-tively on one qubit alone). The function call mechanism is similar to the one used to solve the modified Deutsch problem [25][26][27]. Each function f can be encoded by a unitary transformation U f , with its action on the eigenstates of the two qubits being defined as Pseudo-Hadamard gates [13] are practically equivalent to the Hadamard operator and have been utilised throughout our analysis. The one-qubit pseudo-Hadamard gate is given by In our analysis, the pseudo-Hadamard gate is applied on both qubits non-selectively as well as selectively on one qubit alone. The corresponding gates are denoted as where 1 and 2 label the qubit involved.
There are sixteen U f matrices in all, with eight of them being entangling and the rest non-entangling in character. For example, the U f matrix with diagonal entries [1, 1, 1, −1] cannot be written as a tensor product of two matrices, one belonging to each qubit. This unitary transformation is hence entangling in nature. It is interesting to note that for the two-bit case, the sub-class of functions that are either constant or balanced in the sense of the Deutsch problem i.e. the functions belonging to the (0, 4) and (2, 2) sub-classes, are all separable in character. Therefore, the two-bit Deutsch problem affords a classical explanation and can be implemented using non-entangling transformations alone.
Quantum circuit for two qubits, that implements the algorithm to distinguish between even and odd functions, using pseudo-Hadamard gates (denoted by h) and the U f transformations. Pseudo-Hadamard gates h convert an eigenstate to a uniform superposition of all possible eigenstates while h −1 implement the inverse operation.
A quantum circuit to evaluate the even or odd nature of a function is shown in Figure 1. The algorithm starts with both qubits in a thermal (mixed) initial state. A pseudo-Hadamard transformation is applied on both qubits, resulting in both of them being in a state which is a superposition of all possible input states.
The desired unitary transformation U f is then applied on this superposition state, followed by a pseudo-Hadamard gate operating on the second qubit alone. The function is called again through U f and an inverse pseudo-Hadamard is applied on both qubits before the read-out operation. The result of the computation is encoded in the final state of the two qubits. If the function is even, both the qubits are in an unentangled state and a signal is obtained for the qubit on which the selective pseudo-Hadamard gate is applied, with no signal being obtained for the other qubit. If the function is odd, both qubits are in an entangled state, corresponding to multiple-quantum coherence of the two spins, and no observable signal is obtained. The even or odd nature of the function can thus be distinguished "pictorially", by looking at the final NMR spectrum.
Previously, the algorithm has been described for a pure initial state [30]. In NMR one normally encounters mixed states. Hence we first generalise the procedure to include mixed initial states. Consider the two qubits in an initial state described by the deviation density matrix with k 1 and k 2 being independent variables. For k 1 = 1 and k 2 = 0 this density matrix represents a pseudopure state. For k 1 = 1 and k 2 = −1 it represents a thermal state. Multiples of identity have been ignored in the density matrix, as they do not contribute to the measured signal in an NMR experiment.
We now evolve this density matrix through the sequence of operations h (1,2) U f h (2) U f h (1,2) −1 . After some algebra, this leads to the deviation density matrix where ζ = +1 or −1, for different U f transformations. For k 1 = 1 and k 2 = 0 we arrive at the the pure state result of [30] i.e., the final state is |00 + ζ|01 for an even function and |00 + ζ|11 for an odd function. For a thermal initial state i.e. k 1 = −k 2 = 1, the deviation density matrices ∆ρ even and ∆ρ odd , can be distinguished unambiguously by a single NMR measurement. The spectrum for even functions will give two lines corresponding to the observable single quantum coherences present in the density matrix. For odd functions there is no signal as the only non-diagonal elements of the density matrix are the ones corresponding to double-quantum coherences. We note here that a single NMR measurement is able to distinguish between two non-orthogonal quantum states which is normally not possible using other measurement techniques [32]. We further note that the presence of double-quantum coherences in the final state for the odd functions shows the entangling nature of the unitary transformations used. The use of a Hadamard instead of a pseudo-Hadamard transformation would lead to results which are qualitatively similar. The entanglement in the final state would show up as a zero-quantum coherence of the two qubits, instead of a double-quantum coherence [30]. We have implemented the two-qubit even/odd quantum algorithm using the molecule of 5-Fluorouracil (dissolved in DMSO) as an NMR quantum computer, with the fluorine and the ortho-proton being identified as the two input qubits. This fluorine-proton spin system is a good candidate for quantum computing since it has good sensitivity, a resolved J-coupling of 6.1 Hz and the duration of spin-selective pulses can be relatively short. All experiments have been performed on a Bruker AMX-400 spectrometer at room temperature. The pseudo-hadamard gate has been achieved by applying a (90 0 ) y pulse selectively on a spin, or non-selectively on both spins, as the case maybe.
Even Function U 4 : Odd Function U 9 : We have used pulse schemes consisting of sandwiches of composite and spin-selective pulses (described schematically in Figure 2), to implement the even and odd U f transformations.
As an illustration, the unitary transformation U 4 (given by the diagonal matrix [1, −1, −1, 1]) corresponds to a π-rotation about the z-axis of both the qubits, upto a global phase factor. Global phase changes are not detectable in NMR and are hence ignored for the purposes of the experiment. The z-rotation can be implemented using a composite-pulse sandwich, as a set of rotations about the x and y axes [θ] z ≡ [π/2] x [θ] y [π/2] −x The U f 's encoding the other even functions U 1 , U 2 and U 3 correspond to the do-nothing operation (the transformation is the unity matrix), a [π] z rotation in the single-spin subspace of the first qubit, and a [π] z rotation on the second qubit respectively, and have been constructed using similar pulse schemes. All these even transformations can be decomposed into transformations in the subspaces of each individual qubit and have hence been implemented experimentally without invoking quantum entanglement. The result of applying all the even transformations on the two qubits is shown in Fig 3. Spin-selective pulses of 12.7 µ secs on the proton and 22.1 µ secs on the fluorine have been used to achieve good selectivity. The spectra obtained reveal a retention of the fluorine spin singlequantum coherence, while no lines are seen for the proton (whose coherence has been converted back to unobservable z-magnetization by the selective pseudo-Hadamard gate). We have used entangling transformations to implement the odd functions. Consider the non-separable U 9 matrix with the entries [1, −1, −1, −1] along its diagonal. The transformation is achieved experimentally by a [π/2] z ro-tation on the first spin, followed by a [π/2] z rotation on the second spin, and then a free evolution for a time interval τ tailored to τ = 1/2J, J being the value of the scalar coupling. A non-selective π pulse has been applied in the middle of the τ interval, to refocus the chemical shift evolution. The [π/2] z rotations in the single-spin subspaces have been achieved by the composite pulse sandwiches [π/2] x [π/2] y [π/2] −x , selective on the spin concerned. The other odd functions have been similarly implemented. The spectra corresponding to the experimental implementation of the odd functions is shown in Fig. 4. The states of the two qubits are completely entangled, leading to no observable spectral lines for all the these functions. All the spectra in both Figs. 3 and 4 have been plotted to the same scale. The odd functions U13 − U16 (Ui+4 = Ui, i = 9, 10, 11, 12) lead to the same results (spectra not shown). A τ period of 82.24 ms has been used to implement the evolution under the scalar coupling Hamiltonian. All the spectra shown have been plotted to the same scale as in Fig. 3.
In conclusion, we have shown the NMR implementation of a quantum algorithm that uses the entangled states of two input qubits to distinguish between even and odd functions. We have used spin-selective, composite pulse sandwiches and evolution under scalar coupling to implement the required non-trivial entangling transformations. It is interesting that NMR experiments are able to distinguish between two non-orthogonal quantum mechanical states in a single measurement.
SIF at IISc Bangalore is acknowledged for the use of the AMX-400 spectrometer and IISc for financial support. ⋆ arvind@physics.iisc.ernet.in † kavita@physics.iisc.ernet.in