Abstract
In this article, we present a novel method for synthesizing quantum circuits from user-supplied components. Given input-output state vectors and component quantum gates, our synthesizer aims to construct a quantum circuit that implements the provided functionality in terms of the supplied component gates. To achieve this, we basically use an enumerative search with pruning. To accelerate the procedure, however, we perform the search and pruning at the module level; instead of simply enumerating candidate circuits by appending component gates in sequence, we stack modules, which are groups of gate operations. With this modular approach, we can effectively reduce the search space by directing the search in a way that bridges the gap between the current circuit and the input-output specification. Evaluation on 17 benchmark problems shows that our technique is highly effective at synthesizing quantum circuits. Our method successfully synthesized 16 out of 17 benchmark circuits in 96.6 seconds on average. On the other hand, the conventional, gate-level synthesis algorithm succeeded in 10 problems with an average time of 639.1 seconds. Our algorithm increased the speed of the baseline by 20.3x for the 10 problems commonly solved by both approaches.
- Gadi Aleksandrowicz, Thomas Alexander, Panagiotis Barkoutsos, Luciano Bello, Yael Ben-Haim, David Bucher, Francisco Jose Cabrera-Hernández, Jorge Carballo-Franquis, Adrian Chen, Chun-Fu Chen, Jerry M. Chow, Antonio D. Córcoles-Gonzales, Abigail J. Cross, Andrew Cross, Juan Cruz-Benito, Chris Culver, Salvador De La Puente González, Enrique De La Torre, Delton Ding, Eugene Dumitrescu, Ivan Duran, Pieter Eendebak, Mark Everitt, Ismael Faro Sertage, Albert Frisch, Andreas Fuhrer, Jay Gambetta, Borja Godoy Gago, Juan Gomez-Mosquera, Donny Greenberg, Ikko Hamamura, Vojtech Havlicek, Joe Hellmers, Łukasz Herok, Hiroshi Horii, Shaohan Hu, Takashi Imamichi, Toshinari Itoko, Ali Javadi-Abhari, Naoki Kanazawa, Anton Karazeev, Kevin Krsulich, Peng Liu, Yang Luh, Yunho Maeng, Manoel Marques, Francisco Jose Martín-Fernández, Douglas T. McClure, David McKay, Srujan Meesala, Antonio Mezzacapo, Nikolaj Moll, Diego Moreda Rodríguez, Giacomo Nannicini, Paul Nation, Pauline Ollitrault, Lee James O’Riordan, Hanhee Paik, Jesús Pérez, Anna Phan, Marco Pistoia, Viktor Prutyanov, Max Reuter, Julia Rice, Abdón Rodríguez Davila, Raymond Harry Putra Rudy, Mingi Ryu, Ninad Sathaye, Chris Schnabel, Eddie Schoute, Kanav Setia, Yunong Shi, Adenilton Silva, Yukio Siraichi, Seyon Sivarajah, John A. Smolin, Mathias Soeken, Hitomi Takahashi, Ivano Tavernelli, Charles Taylor, Pete Taylour, Kenso Trabing, Matthew Treinish, Wes Turner, Desiree Vogt-Lee, Christophe Vuillot, Jonathan A. Wildstrom, Jessica Wilson, Erick Winston, Christopher Wood, Stephen Wood, Stefan Wörner, Ismail Yunus Akhalwaya, and Christa Zoufal. 2019. Qiskit: An Open-source Framework for Quantum Computing. https://doi.org/10.5281/zenodo.2562111
Google Scholar
Cross Ref
- Benjamin Bichsel, Maximilian Baader, Timon Gehr, and Martin Vechev. 2020. Silq: A High-Level Quantum Language with Safe Uncomputation and Intuitive Semantics. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2020). Association for Computing Machinery, New York, NY, USA. 286–300. isbn:9781450376136 https://doi.org/10.1145/3385412.3386007
Google Scholar
Digital Library
- D. Coppersmith. 2002. An approximate Fourier transform useful in quantum factoring. https://doi.org/10.48550/ARXIV.QUANT-PH/0201067
Google Scholar
- Diogo Cruz, Romain Fournier, Fabien Gremion, Alix Jeannerot, Kenichi Komagata, Tara Tosic, Jarla Thiesbrummel, Chun Lam Chan, Nicolas Macris, Marc-André Dupertuis, and Clément Javerzac-Galy. 2019. Efficient Quantum Algorithms for GHZ and W States, and Implementation on the IBM Quantum Computer. Advanced Quantum Technologies, 2, 5-6 (2019), 1900015. https://doi.org/10.1002/qute.201900015 arxiv:https://onlinelibrary.wiley.com/doi/pdf/10.1002/qute.201900015.
Google Scholar
Cross Ref
- Marc Grau Davis, Ethan Smith, Ana Tudor, Koushik Sen, Irfan Siddiqi, and Costin Iancu. 2019. Heuristics for Quantum Compiling with a Continuous Gate Set. https://doi.org/10.48550/ARXIV.1912.02727
Google Scholar
- Marc G. Davis, Ethan Smith, Ana Tudor, Koushik Sen, Irfan Siddiqi, and Costin Iancu. 2020. Towards Optimal Topology Aware Quantum Circuit Synthesis. In 2020 IEEE International Conference on Quantum Computing and Engineering (QCE). 223–234. https://doi.org/10.1109/QCE49297.2020.00036
Google Scholar
Cross Ref
- Cirq Developers. 2022. Cirq. https://doi.org/10.5281/zenodo.6599601 See full list of authors on Github: https://github .com/quantumlib/Cirq/graphs/contributors
Google Scholar
Cross Ref
- Thomas G. Draper. 2000. Addition on a Quantum Computer. https://doi.org/10.48550/ARXIV.QUANT-PH/0008033
Google Scholar
- W. Dür, G. Vidal, and J. I. Cirac. 2000. Three qubits can be entangled in two inequivalent ways. Phys. Rev. A, 62 (2000), Nov, 062314. https://doi.org/10.1103/PhysRevA.62.062314
Google Scholar
Cross Ref
- Yu Feng, Ruben Martins, Jacob Van Geffen, Isil Dillig, and Swarat Chaudhuri. 2017. Component-Based Synthesis of Table Consolidation and Transformation Tasks from Examples. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017). Association for Computing Machinery, New York, NY, USA. 422–436. isbn:9781450349888 https://doi.org/10.1145/3062341.3062351
Google Scholar
Digital Library
- Yu Feng, Ruben Martins, Yuepeng Wang, Isil Dillig, and Thomas W. Reps. 2017. Component-Based Synthesis for Complex APIs. SIGPLAN Not., 52, 1 (2017), jan, 599–612. issn:0362-1340 https://doi.org/10.1145/3093333.3009851
Google Scholar
Digital Library
- John K. Feser, Swarat Chaudhuri, and Isil Dillig. 2015. Synthesizing Data Structure Transformations from Input-Output Examples. SIGPLAN Not., 50, 6 (2015), jun, 229–239. issn:0362-1340 https://doi.org/10.1145/2813885.2737977
Google Scholar
Digital Library
- András Gilyén, Yuan Su, Guang Hao Low, and Nathan Wiebe. 2019. Quantum Singular Value Transformation and beyond: Exponential Improvements for Quantum Matrix Arithmetics. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing (STOC 2019). Association for Computing Machinery, New York, NY, USA. 193–204. isbn:9781450367059 https://doi.org/10.1145/3313276.3316366
Google Scholar
Digital Library
- Timothée Goubault de Brugière, Marc Baboulin, Benoît Valiron, and Cyril Allouche. 2020. Quantum circuits synthesis using Householder transformations. Computer Physics Communications, 248 (2020), 107001. issn:0010-4655 https://doi.org/10.1016/j.cpc.2019.107001
Google Scholar
Cross Ref
- Alexander S. Green, Peter LeFanu Lumsdaine, Neil J. Ross, Peter Selinger, and Benoî t Valiron. 2013. Quipper. ACM SIGPLAN Notices, 48, 6 (2013), jun, 333–342. https://doi.org/10.1145/2499370.2462177
Google Scholar
Digital Library
- Lov K. Grover. 1996. A Fast Quantum Mechanical Algorithm for Database Search. In Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing (STOC ’96). Association for Computing Machinery, New York, NY, USA. 212–219. isbn:0897917855 https://doi.org/10.1145/237814.237866
Google Scholar
Digital Library
- M. Hein, J. Eisert, and H. J. Briegel. 2004. Multiparty entanglement in graph states. Physical Review A, 69, 6 (2004), jun, https://doi.org/10.1103/physreva.69.062311
Google Scholar
Cross Ref
- Raban Iten, Roger Colbeck, Ivan Kukuljan, Jonathan Home, and Matthias Christandl. 2016. Quantum circuits for isometries. Phys. Rev. A, 93 (2016), Mar, 032318. https://doi.org/10.1103/PhysRevA.93.032318
Google Scholar
Cross Ref
- Susmit Jha, Sumit Gulwani, Sanjit A. Seshia, and Ashish Tiwari. 2010. Oracle-Guided Component-Based Program Synthesis. In Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 1 (ICSE ’10). Association for Computing Machinery, New York, NY, USA. 215–224. isbn:9781605587196 https://doi.org/10.1145/1806799.1806833
Google Scholar
Digital Library
- Woosuk Lee. 2021. Combining the Top-down Propagation and Bottom-up Enumeration for Inductive Program Synthesis. Proc. ACM Program. Lang., 5, POPL (2021), Article 54, jan, 28 pages. https://doi.org/10.1145/3434335
Google Scholar
Digital Library
- Guang Hao Low and Isaac L. Chuang. 2019. Hamiltonian Simulation by Qubitization. Quantum, 3 (2019), July, 163. issn:2521-327X https://doi.org/10.22331/q-2019-07-12-163
Google Scholar
Cross Ref
- Mario Mastriani. 2021. Quantum Fourier transform is the building block for creating entanglement. Scientific Reports, 11, 1 (2021), 1–10.
Google Scholar
Cross Ref
- James McClung. 2020. Constructions and Applications of W-States. Worcester Polytechnic Institute.
Google Scholar
- Mikko Möttönen, Juha J. Vartiainen, Ville Bergholm, and Martti M. Salomaa. 2004. Quantum Circuits for General Multiqubit Gates. Phys. Rev. Lett., 93 (2004), Sep, 130502. https://doi.org/10.1103/PhysRevLett.93.130502
Google Scholar
Cross Ref
- Matthew Neeley, Radoslaw C Bialczak, M Lenander, Erik Lucero, Matteo Mariantoni, AD O’connell, D Sank, H Wang, M Weides, and J Wenner. 2010. Generation of three-qubit entangled states using superconducting phase qubits. Nature, 467, 7315 (2010), 570–573.
Google Scholar
- Michael A. Nielsen and Isaac L. Chuang. 2011. Quantum Computation and Quantum Information: 10th Anniversary Edition (10th ed.). Cambridge University Press, USA. isbn:1107002176
Google Scholar
Digital Library
- Peter-Michael Osera and Steve Zdancewic. 2015. Type-and-Example-Directed Program Synthesis. SIGPLAN Not., 50, 6 (2015), jun, 619–630. issn:0362-1340 https://doi.org/10.1145/2813885.2738007
Google Scholar
Digital Library
- Anouk Paradis, Benjamin Bichsel, Samuel Steffen, and Martin Vechev. 2021. Unqomp: Synthesizing Uncomputation in Quantum Circuits. In Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI 2021). Association for Computing Machinery, New York, NY, USA. 222–236. isbn:9781450383912 https://doi.org/10.1145/3453483.3454040
Google Scholar
Digital Library
- QK. 2022. Task 1.7. https://github.com/microsoft/QuantumKatas/blob/main/Superposition/Workbook_Superposition.ipynb
Google Scholar
- QK. 2022. Task 2.1. https://github.com/microsoft/QuantumKatas/blob/main/GHZGame/Workbook_GHZGame.ipynb
Google Scholar
- QK. 2022. Task 2.3. https://github.com/microsoft/QuantumKatas/blob/0bc1b11ad2b29e358a9100dea7d0b9a973f5f9fd/Superposition/Workbook_Superposition_Part2.ipynb
Google Scholar
- Neil J. Ross. 2015. Optimal Ancilla-Free CLIFFORD+V Approximation of Z-Rotations. Quantum Info. Comput., 15, 11–12 (2015), sep, 932–950. issn:1533-7146
Google Scholar
- SE. 2018. How can I build a circuit to generate an equal superposition of 3 outcomes for 2 qubits? https://quantumcomputing.stackexchange.com/questions/2310/how-can-i-build-a-circuit-to-generate-an-equal-superposition-of-3-outcomes-for-2
Google Scholar
- SE. 2018. How can the state 0 + M^-1/2 \DOTSI ∑op \slimits@ _j=1^M j be generated? https://quantumcomputing.stackexchange.com/questions/4545/how-can-the-state-lvert0-ranglem-1-2-sum-j-1m-lvert-j-rangle-be-genera
Google Scholar
- SE. 2018. How do I build a gate from a matrix on Qiskit? https://quantumcomputing.stackexchange.com/questions/4975/how-do-i-build-a-gate-from-a-matrix-on-qiskit
Google Scholar
- SE. 2018. How to create a quantum algorithm that produces 2n-bit sequences with equal number of 1-bits? https://mathoverflow.net/questions/301733/how-to-create-a-quantum-algorithm-that-produces-2-n-bit-sequences-with-equal-num
Google Scholar
- SE. 2019. Quantum circuit for a three-qubit bit-flip code. https://quantumcomputing.stackexchange.com/questions/9175/quantum-circuit-for-a-three-qubit-bit-flip-code
Google Scholar
- SE. 2020. Generalized construction of W basis. https://quantumcomputing.stackexchange.com/questions/13077/generalized-construction-of-w-basis
Google Scholar
- SE. 2020. Quantum Circuit explaination. https://quantumcomputing.stackexchange.com/questions/12552/quantum-circuit-explaination
Google Scholar
- SE. 2020. Transforming 100 state into 000+111 state using only Hadamard and CNOT gates. https://quantumcomputing.stackexchange.com/questions/14642/transforming-100-rangle-state-into-000-rangle-111-rangle-state-using-on
Google Scholar
- V.V. Shende, S.S. Bullock, and I.L. Markov. 2006. Synthesis of quantum-logic circuits. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 25, 6 (2006), 1000–1010. https://doi.org/10.1109/TCAD.2005.855930
Google Scholar
Digital Library
- Peter W. Shor. 1997. Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer. SIAM J. Comput., 26, 5 (1997), oct, 1484–1509. issn:0097-5397 https://doi.org/10.1137/S0097539795293172
Google Scholar
Digital Library
- Ethan Smith, Marc G. Davis, Jeffrey M. Larson, Ed Younis, Lindsay Bassman Oftelie, Wim Lavrijsen, and Costin Iancu. 2022. LEAP: Scaling Numerical Optimization Based Synthesis Using an Incremental Approach. ACM Transactions on Quantum Computing, aug, https://doi.org/10.1145/3548693
Google Scholar
Digital Library
- Sunbeom So and Hakjoo Oh. 2017. Synthesizing Imperative Programs from Examples Guided by Static Analysis. In Static Analysis, Francesco Ranzato (Ed.). Springer International Publishing, Cham. 364–381.
Google Scholar
- Krysta Svore, Alan Geller, Matthias Troyer, John Azariah, Christopher Granade, Bettina Heim, Vadym Kliuchnikov, Mariia Mykhailova, Andres Paz, and Martin Roetteler. 2018. Q#: Enabling Scalable Quantum Computing and Development with a High-Level DSL. In Proceedings of the Real World Domain Specific Languages Workshop 2018 (RWDSL2018). Association for Computing Machinery, New York, NY, USA. Article 7, 10 pages. isbn:9781450363556 https://doi.org/10.1145/3183895.3183901
Google Scholar
Digital Library
- Qiskit Transpiler. 2022. transpiler-qiskit-transpiler. https://qiskit.org/documentation/apidoc/transpiler.html
Google Scholar
- Robert R. Tucci. 2005. An Introduction to Cartan’s KAK Decomposition for QC Programmers. https://doi.org/10.48550/ARXIV.QUANT-PH/0507171
Google Scholar
- Abhishek Udupa, Arun Raghavan, Jyotirmoy V. Deshmukh, Sela Mador-Haim, Milo M.K. Martin, and Rajeev Alur. 2013. TRANSIT: Specifying Protocols with Concolic Snippets. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’13). Association for Computing Machinery, New York, NY, USA. 287–296. isbn:9781450320146 https://doi.org/10.1145/2491956.2462174
Google Scholar
Digital Library
- Chenglong Wang, Alvin Cheung, and Rastislav Bodik. 2017. Synthesizing Highly Expressive SQL Queries from Input-Output Examples. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017). Association for Computing Machinery, New York, NY, USA. 452–466. isbn:9781450349888 https://doi.org/10.1145/3062341.3062365
Google Scholar
Digital Library
- Ed Younis, Koushik Sen, Katherine Yelick, and Costin Iancu. 2020. QFAST: Quantum Synthesis Using a Hierarchical Continuous Circuit Space. https://doi.org/10.48550/ARXIV.2003.04462
Google Scholar
- Charles Yuan and Michael Carbin. 2022. Tower: Data Structures in Quantum Superposition. arXiv preprint arXiv:2205.10255.
Google Scholar
Index Terms
Modular Component-Based Quantum Circuit Synthesis
Recommendations
A novel quantum-inspired evolutionary computation-based quantum circuit synthesis for various universal gate libraries
GECCO '22: Proceedings of the Genetic and Evolutionary Computation Conference CompanionThe quantum circuit is the prime factor to realize quantum computation. This paper proposes a novel quantum-inspired evolutionary computation method to synthesize quantum circuits effectively and efficiently. Recently, the Clifford+T gate library has ...
Automatic Synthesis of Quantum Teleportation Circuit
ICCIT '09: Proceedings of the 2009 Fourth International Conference on Computer Sciences and Convergence Information TechnologyQuantum teleportation is a typical quantum circuit. We choose it as a benchmark circuit for the problem of quantum circuit synthesis. Genetic algorithm is introduced to synthesis the circuit. A simple coding scheme and the corresponding fitness function ...
An Algebraic Quantum Circuit Compression Algorithm for Hamiltonian Simulation
Quantum computing is a promising technology that harnesses the peculiarities of quantum mechanics to deliver computational speedups for some problems that are intractable to solve on a classical computer. Current generation noisy intermediate-scale quantum (...






Comments