Distinguishing Unitary Gates on the IBM Quantum Processor
aa r X i v : . [ qu a n t - ph ] J u l Distinguishing Unitary Gates on the IBM Quantum Processor
Shusen Liu,
1, 2, ∗ Yinan Li,
2, 3, † and Runyao Duan
2, 4, ‡ School of Data and Computer Science, Sun Yat-sen University, Guangzhou, Guangdong, 510006, P. R. China Centre for Quantum Software and Information,Faculty of Engineering and Information Technology,University of Technology Sydney, NSW 2007, Australia Centrum Wiskunde & Informatica and Research Center for Quantum Software, the Netherlands. Institute for Quantum Computing, Baidu Inc., Beijing 100193, China (Dated: July 3, 2018)An unknown unitary gates, which is secretly chosen from several known ones, can always bedistinguished perfectly. In this paper, we implement such a task on IBM’s quantum processor.More precisely, we experimentally demonstrate the discrimination of two qubit unitary gates, theidentity gate and the π -phase shift gate, using two discrimination schemes – the parallel schemeand the sequential scheme. We program these two schemes on the ibmqx4 , a 5-qubit superconductingquantum processor via IBM cloud, with the help of the QSI modules [S. Liu et al., arXiv:1710.09500,2017]. We report that both discrimination schemes achieve success probabilities at least 85%.
I. INTRODUCTION
The discrimination of quantum operations asks toidentify an unknown quantum operation from a set ofknown ones. As a fundamental task in quantum infor-mation and computation, many interesting aspects havebeen discovered over the last two decades, see [1–9] (andreferences therein) for a partial list. As applications, thediscrimination of quantum operations plays importantroles in the design of classical data hiding protocols [5]and the study of quantum reading capacity [10].The discrimination protocol is a step-by-step proce-dure consisting of (the unknown) operation evaluations,along with quantum state preparations, additional quan-tum operations and measurements. The goal is to out-put the identity of the given operations, based on themeasurement results. Comparing to the discriminationof quantum states, the discrimination of quantum oper-ations admits more freedoms. To see this, we note thatquantum operations are reusable, which enables quan-tum entanglement to be capitalized in the discriminationprotocols. In addition, ancillary systems are generallynecessary for the optimal discrimination of two quantumoperations. The perfect distinguishability of unitary op-erations [1] and quantum measurement apparatus [2], re-lies crucially on these aspects.On the other hand, quantum operations can be used inmany fundamental different ways, such as in parallel orin sequential. A parallel (discrimination) scheme enablesthe unknown quantum operation to be performed in par-allel, which can be viewed as a direct generalization of thequantum state discrimination with multiple i.i.d. copies. ∗ [email protected] † [email protected] ‡ [email protected], [email protected]; This workwas mainly completed while the third author was in the Uni-versity of Technology Sydney.
A sequential scheme performs the unknown quantum op-eration step by step, while realizable extra quantum op-erations might be utilized to modify the intermediatestates. Note that there exist quantum operations whichcannot be distinguished using parallel schemes, but canbe done by sequential schemes [11, 12]. These two fun-damental discrimination schemes turn out to be crucialin the study of the perfect distinguishability of quantumoperations. Duan, Feng and Ying [5] concluded a suffi-cient and necessary condition to determine whether twoquantum operations can be perfectly distinguished. Inparticular, for those perfectly distinguishable quantumoperations, the discrimination protocol consists a finitenumber of uses of the unknown operations, and the ap-plication of extra quantum operations before performingmeasurements for the identifications.When consider a restricted but important family ofquantum operations – the unitary gates (operations), theperfect discrimination among them is insensitive to thechoice of strategies: Any two different unitary operationscan be distinguished perfectly, by either applying the un-known one finite times in parallel [1], or in sequential [4].Thus, there exists an interesting trade-off between thespatial resources (entanglement or circuits) and the tem-poral resources (running steps or discriminating times)in the discrimination of unitary operations [4]. In prin-cipal, the main obstacle of performing parallel schemesis the difficulty of preparing pure multipartite entangledstates. Performing sequential schemes can overcome thisdifficulty, while the long discriminating time may causethe decoherence .On experiment aspects, several pioneering experimentsbased on the non-universal devices have been devoted torelated schemes. Liu and Hong [13] demonstrated theexperiment on the sequential scheme using Ti:Sapphiremode-locked laser. They reached successful probabilitiesaround 99.5% and 99.6% respectively on two fixed ex-amples. Zhang et al. [14] also used the laser performingthe sequential protocol and reached the successful prob-abilities above 98%. Laing, Rudolph and O’Brien [15]conducted the unitary quantum process discrimination(QPD) on photons without entanglement having a cer-tainty around 99% and the entanglement-assisted unitaryQPD exceeding 97% certainty.Although large-scale universal quantum computer maystill be far off, we are approaching this so-called Noisy In-termediate Scale (NISQ) era of Quantum computing [16].In particular, IBM Corporation has started to providequantum cloud service, called IBM Q. IBM Q enablesus to perform high fidelity quantum gate operations andmeasurements on superconducting transmon qubits. Inthis paper, we implement both the parallel and sequentialdiscrimination schemes to distinguish two qubit unitarygates, the π -phase shift gate R π = [ e iπ ] and theidentity gate V = I = [ ] on the 5-qubit quantum pro-cessor ( ibmqx4 ). Note that R π can be easily constructedusing QISKit [17]. Moreover, we use the quantum pro-gramming platform
QSI [18] to generate the discrimina-tion schemes, determine the parameters of programs andtranslate to the quantum assembly language (QASM),which can be uploaded and performed on ibmqx4 via IBMQ cloud service.In the following, we first present the parallel and se-quential schemes to distinguish R π and I , including theway to prepare the input states and perform measure-ments. Then, we exhibit the discrimination experimentsperformed on ibmqx4 [19], and analyze the (measure-ment) results. In the end, we discuss the advantagesand disadvantages of parallel and sequential schemes, andpropose some future directions. II. DESCRIPTION OF THE EXPERIMENTSA. The discrimination schemes a. The Parallel Schemes
As described in [1, 12], todistinguish two unitary gates, R π and V , one may pre-pare an N -partite quantum states ∣ Ψ ⟩ as the input forsome positive integer N , such that U ⊗ N ∣ Ψ ⟩ ⊥ V ⊗ N ∣ Ψ ⟩ .To identify the unknown unitary operation, we per-form the measurement { M = U ⊗ N ∣ Ψ ⟩⟨ Ψ ∣ ( U ⊗ N ) † , M = V ⊗ N ∣ Ψ ⟩⟨ Ψ ∣ ( V ⊗ N ) † } if global operations are possible;otherwise we can implement the local discrimination pro-tocol, introduced in [20]. The outcome being 0 corre-sponds to the unknown operation being R π ; the out-come being 1 corresponds to the unknown operation be-ing V .In our setting, we choose N = ∣ Ψ ⟩ = ( √ ∣ ⟩+ √ ∣ ⟩)⊗∣ ⟩+(− √ ∣ ⟩+ √ ∣ ⟩)⊗∣ ⟩ . (1)It is easy to verify that R ⊗ π ∣ Ψ ⟩ = ( √ ∣ ⟩+ e iπ √ ∣ ⟩)⊗∣ ⟩+(− e iπ √ ∣ ⟩+ e iπ √ ∣ ⟩)⊗∣ ⟩ , and ⟨ Ψ ∣ R ⊗ π ∣ Ψ ⟩ = b. The Sequential Schemes As described in [4], arbi-trary two unitary operations, R π and V , can be distin-guished without entanglement, albeit additional unitaryoperations are required. Explicitly, we prepare ∣ Φ ⟩ as theinput state, as well as a finite number of auxiliary uni-tary gates X , . . . , X N − . These auxiliary unitary gateswill be applied to ensure that U X U ⋯ U X N − U ∣ Φ ⟩ ⊥ V X V ⋯ V X N − V ∣ Φ ⟩ .In our setting, only 1 auxiliary unitary gate is re-quired, which is the rotation matrix [ cos α − sin α sin α cos α ] with α = arctan ( /√ ) . Explicitly, X = ⎡⎢⎢⎢⎢⎣ √ √ − √ √ √ √ ⎤⎥⎥⎥⎥⎦ . Moreover, we choose the input as ∣ Φ ⟩ ∶= √ (∣ ϕ ⟩ + ∣ ϕ ⟩) , (2)where ∣ ϕ ⟩ and ∣ ϕ ⟩ are the eigenvectors of X † U XU = ⎡⎢⎢⎢⎣ + √ i − √ i − √ + √ i − − √ i ⎤⎥⎥⎥⎦ . Eventually, we perform the measurement { M = U XU ∣ Φ ⟩⟨ Φ ∣ U † X † U † , M = X ∣ Φ ⟩⟨ Φ ∣ X † } . Resulting 0implies the unknown operation is R π , while resulting1 implies the unknown operation is I . B. Implementation Details
The parallel and sequential discrimination schemes arepresented in FIG. 1a and FIG. 1b, respectively. Note thatthe unitary gate R π = [ e iπ ] can be generated by QISKit [17]. In fact,
QISKit can be used to implementall qubit unitary gates, parameterized as U ( θ, φ, λ ) ∶= [ e − i ( φ + λ )/ cos ( θ / ) − e − i ( φ − λ )/ sin ( θ / ) e i ( φ − λ )/ sin ( θ / ) e i ( φ + λ )/ cos ( θ / ) ] on the quantum processor with gate fidelity around99 . ∣ ⟩ , and mea-sure each qubit with respect to the computational ba-sis {∣ ⟩⟨ ∣ , ∣ ⟩⟨ ∣} . Thus, we need to generate the in-put state preparation circuits and rotate the measure-ment to computational basis. In the sequential scheme(FIG. 1b), U p = U ( . , . , . ) and U m = U ( . , . , . ) . Implementing the circuit inFIG. 1b and measuring the output state, we assert that O is R π if the (measurement) output is 0; O is I if theoutput is 1. | i U p O U m | i O (a) The parallel scheme to distinguish the unknown operation O ∈ { R π , I } , where U p and U m indicate the state preparationand measurement circuits. | i U p O X O U p (b) The sequential scheme to distinguish the unknownoperation O ∈ { R π , I } , where U p and U m indicate the statepreparation and measurement circuits. FIG. 1: Parallel and sequential discrimination schemes H • u . , , FIG. 2: The quantum circuit ( U p ) which generate ∣ Ψ ⟩ from ∣ ⟩ ⊗ ∣ ⟩ .In the parallel scheme, to prepare the input state ∣ Ψ ⟩ ,computed in Eq. 1, we utilize the circuit presented inFIG. 2. In the measurement step, we implement the localdiscrimination protocol for two multipartite states [20],as shown in FIG. 3. Implementing such a circuit andmeasuring the output state, we say O is R π if the outputis 01 or 10; and O is I if the output is 00 or 11. • u . , . , π ) u . , π, π ) FIG. 3: The quantum circuit ( U m ) which distinguish U ⊗ ∣ Ψ ⟩ and ∣ Ψ ⟩ . III. THE EXPERIMENTS
We perform the discrimination experiments on theIBM’s quantum processor ibmqx4 , while generate thecircuits by
QSI (the key code segments can be found in( https://github.com/klinus9542/UnitaryDistIBMQ )).To simulate the secret chosen procedure, we simply gen-erate a uniformly random bit for choosing the identityof I and R π , which can be accomplished in QSI easily. Then we generate the discrimination protocols,as shown in FIG. 1a and FIG. 1b replacing the gate O by the chosen gate. QSI converts the quantumcircuit to the quantum assembly language, and executethe experiments on ibmqx4 through the applicationprogramming interface (API) of quantum cloud serviceprovided by IBM. For each random bit, we execute thediscrimination scheme on ibmqx4 for 1024 times andgather the measurement results.Based on the theoretical calculations, the identity ofthe chosen unitary gates will be perfectly determined.For instance, when we apply parallel scheme (FIG. 1a)and O is chosen as R π , the measurement outputs shouldonly contains 01 and 10, which appears with equallymany times. However, current quantum technologiesmay not be able to achieve the theoretical performance.As mentioned before, the fidelity of single qubit gate isstill not perfect, which causes unavoidable error. Anothertype of error arises from introducing the state prepara-tion circuits and measurement circuits since the theoreti-cal input states and the measurements contain irrational parameters presented by float type in software, whichcannot be created accurately. Last but not least, themeasurement results need to be sorted, as some “impos-sible” results might appear: In principal, the statisti-cal results can be xy
000 when using the 5-qubit ibmqx4 chip. However, in fact, the outputs can be arbitrary 5-bitstrings as there might be errors between used qubits andunused qubits. For these, we ignore the unused qubitsand sort the final results.FIG. 4a and FIG. 4b stand for the statistical mea-surement results for parallel discrimination schemes, andFIG. 5a and FIG. 5b stand for the statistical measure-ment results for parallel discrimination schemes. FIG. 6illustrates the box-plot of success probabilities on paralleland sequential schemes, where we perform each scheme10 times with randomly chosen O , each of which includes1024 repeating experiments. The choices of O depend onthe value of a random bit, generated on classical com-puters. It can be observed that both the worst (85 . . O is re-placed by I . Thus, the discrimination scheme (FIG. 1b)contains only three qubit gates. On the other hand, theworst success probability is achieved when O is replacedby R π , where 5 (rather complicated) gates need to beexecuted, which might increase the error. For the par- (a) Perform the circuit in FIG. 1a by replacing O by R π for1024 times. After sorting the outputs, 834 rounds outputeither 01 or 10 (indicates O is R π ), and 190 rounds outputeither 00 or 11 or other results (indicate O is not R π ).(b) Perform the circuit in FIG. 1a by replacing O by I for1024 times. After sorting the outputs, 875 rounds outputeither 00 or 11 (indicate O is I ), and 149 rounds output either01 or 10 or other results (indicate O is not I ). FIG. 4: Statistical results in the parallel discriminationexperiments.allel scheme, the success probabilities are ranging from88% to 92%, with not very significant differences (standdeviation of parallel scheme is σ = . σ = . IV. CONCLUSION AND DISCUSSION
In this paper, we distinguish unitary gates by paral-lel scheme and sequential scheme on the IBM’s quantumprocessor ibmqx4 . Both two schemes are proposed to (a) Perform the circuit in FIG. 1b by replacing O by R π for1024 times. After sorting the outputs, 857 rounds output 0(indicate O is R π ), and 167 rounds output either 1 or otherresults (indicate O is not R π ).(b) Perform the circuit in FIG. 1b by replacing O by I for1024 times. After sorting the outputs, 1007 rounds output 1(indicate O is I ), and 17 rounds output either 1 or otherresults (indicate O is not I ). FIG. 5: Statistical results in the sequentialdiscrimination experiments.achieve the perfect discrimination theoretically. In ourexperiments, we report that both two schemes can dis-tinguish the qubit unitary gates R π and I with successprobability over 85%, under the condition of supercon-ducting universal quantum computer. In addition, weutilize QSI modules to perform 10 random experimentsfor parallel scheme and sequential scheme, each of whichchooses R π and I uniformly at random. FIG. 6 suggestsboth two schemes can distinguish the randomly chosenunitary gates with high probabilities. Moreover, we in- Sequential Scheme Parallel Scheme0.840.860.880.90.920.940.960.981 S u ccess P r ob a b ili t y FIG. 6: The discrimination success probabilitydistributions for both sequential and paralleldiscrimination. For each round in each scheme, R π and I are chosen depending on a random coin-flipresult. For each scheme, we execute the experiment for10 randomly chosen O . In each box, the central markindicates the median, and the top and the bottomindicate the 75% and 25% percentiles, respectively. fer that using the sequential scheme may achieve highersuccess probabilities than the parallel scheme, while thesuccess probabilities using parallel scheme are more ro-bust than using sequential schemes. In particular, whenthe set of known unitary gates are with rather simplestructures, such as the identity gate or Hadamard gate,the sequential scheme admits more advantages in the dis-criminations. We assert that this is due to the fact thatthe coherence and fidelity of two-qubits gates are still notideal in IBM quantum processors. On the other hand, us-ing parallel discrimination scheme is more robust: it maynot achieve a 90% success probability, while the successprobabilities do not differ too much. We left implement-ing the discrimination of general quantum operations asa further direction. ACKNOWLEDGMENTS
The authors were grateful to the use of the IBM Qexperience, and acknowledge IBM Q community for theirhelpful discussions. The views expressed are those of theauthors and do not reflect the official policy or position ofIBM or the IBM Q experience team. SL is supported bythe National Natural Science Foundation of China (GrantNo.61672007). YL is supported by ERC ConsolidatorGrant 615307-QPROGRESS. [1] A. Ac´ın, Phys. Rev. Lett. , 177901 (2001).[2] Z. Ji, Y. Feng, R. Duan, and M. Ying, Phys. Rev. Lett. , 200401 (2006).[3] G. M. D’Ariano, M. F. Sacchi, and J. Kahn, Phys. Rev.A , 052302 (2005).[4] R. Duan, Y. Feng, and M. Ying, Phys. Rev. Lett. ,100503 (2007).[5] R. Duan, Y. Feng, and M. Ying, Phys. Rev. Lett. ,210501 (2009).[6] R. Duan, Y. Feng, and M. Ying, Phys. Rev. Lett. ,020503 (2008).[7] A. Chefles, A. Kitagawa, M. Takeoka, M. Sasaki, andJ. Twamley, Journal of Physics A: Mathematical andTheoretical , 10183 (2007).[8] J. Watrous, Quantum Info. Comput. , 819 (2008).[9] J. Chen and M. Ying, Quantum Info. Comput. , 160(2010).[10] S. Das and M. M. Wilde, arXiv preprintarXiv:1703.03706 (2017).[11] A. W. Harrow, A. Hassidim, D. W. Leung, and J. Wa-trous, Phys. Rev. A , 032339 (2010).[12] R. Duan, C. Guo, C.-K. Li, and Y. Li, in InformationTheory (ISIT), 2016 IEEE International Symposium on (IEEE, 2016) pp. 2259–2263.[13] L. Jian-Jun and H. Zhi, Chinese Physics Letters , 3663(2008).[14] P. Zhang, L. Peng, Z.-W. Wang, X.-F. Ren, B.-H. Liu, Y.-F. Huang, and G.-C. Guo, Journal of Physics B: Atomic,Molecular and Optical Physics , 195501 (2008). [15] A. Laing, T. Rudolph, and J. L. OBrien, Phys. Rev.Lett. , 160502 (2009).[16] J. Preskill, arXiv preprint arXiv:1801.00862 (2018).[17] A. W. Cross, L. S. Bishop, J. A. Smolin, and J. M.Gambetta, arXiv preprint arXiv:1707.03429 (2017).[18] S. Liu, X. Wang, L. Zhou, J. Guan, Y. Li, Y. He,R. Duan, and M. Ying, arXiv preprint arXiv:1710.09500(2017).[19] 5-qubit backend: IBM QX team, “ibmqx2 backend spec-ification,” Retrieved from https://ibm.biz/qiskit-ibmqx2(2017).[20] J. Walgate, A. J. Short, L. Hardy, and V. Vedral, Phys-ical Review Letters85