BHT-QAOA: The Generalization of Quantum Approximate Optimization Algorithm to Solve Arbitrary Boolean Problems as Hamiltonians
Abstract
:1. Introduction
- All n nodes of the MaxCut problem are represented into their equivalent n input qubits, which are initially set to the |0⟩ state.
- Hadamard (H) gates are applied to all n input qubits, to create the complete quantum search space of {0,1}⊗n for QAOA to find all solutions.
- Hamiltonian HC represents the quantum circuit of a MaxCut problem as the unitary operator , which is a set of non-connected nodes as RZj(v·ɣ) and connected nodes as RZjZk(v·ɣ), where j and k are the indices of input qubits.
- Hamiltonian HM represents the quantum circuit for the sum of all n input qubits as the unitary operator , which is a set of n RX(ω·β). Note that HM acts as the quantum diffusion operator of QAOA analogous to the diffusion operator in Grover’s algorithm [5,6,7,8], and HM may include other variants and types of gates, not just RX gates, depending on the model of QAOA used (see the Related Work section).
- To improve the quality of all approximated solutions, HC and HM are iterated for a number of repetitions (p), where p ≥ 1, such that every consists of RZ(v·ɣp), RZZ(v·ɣp), etc., and every consists of RX(ω·βp).
- The numerical values of coefficients (v and ω) are calculated during the construction of HC and HM in the classical domain.
- The quantum circuit of QAOA (H {HC HM}p) is executed with a quantum processing unit (QPU) and then measured (in the classical domain) for approximated solutions depending on the chosen values of ɣ and β.
- The measured solutions (as the energy cost of QAOA [1,2]), the chosen values of ɣ and β (as the optimization parameters of QAOA), and the Hamiltonians (HC and HM as an objective function) are fed to a classical optimization minimizer [14,15,16]. This minimizer re-calculates the numerical values of these optimization parameters based on the energy cost from the objective function and updates the HC and HM of QAOA with a new set of optimized numerical values of ɣ and β, respectively.
- For a number of objective function evaluations (nfev), Steps 8 and 9 are concurrently repeated between a QPU and a minimizer, until finding all optimized approximated solutions for a MaxCut problem or stopping based on a pre-defined “halt condition”.
2. Related Work
3. Materials and Methods
3.1. Converting Boolean Oracles from Any Structure to ESOP Structure
- Sketch an empty Karnaugh map with literals (a, b, c, …) and their binary Gray codes.
- Evaluate a Boolean oracle (in any structure) for solutions (as the true minterms of ‘1’) and non-solutions (as the false minterms of ‘0’).
- Group all solutions together from step 2, using 1-cell groups, 2-cell groups, etc.
- Formulate each group from step 3, to generate products (∧) of literals.
- XOR (⊕) all formulated groups together from step 4, to generate an ESOP structure.
3.2. Transforming Boolean Oracles in ESOP Structure to Phase Oracles
3.3. Generating Hamiltonians (HC and HM) from Phase Oracles
- Construct one Hg for one Z, CZ, or MCZ, using Rule 1, Rule 2, or Rule 3, respectively.
- If there are X gates (with their mirrored gates) surrounding Z, CZ, or MCZ in Step 1, then apply Rule 4 on Hg from Step 1 to construct a new Hg. If not, proceed to Step 3.
- Repeat Steps 1 and 2 for another Hg until there are no remaining Z, CZ, and MCZ.
- Group all constructed Hg into one Hamiltonian, which is HC.
- Calculate (add or subtract) all the identical terms of HC to find the v coefficient.
3.4. Architecture of BHT-QAOA
- HC and HM (in a number of p), as the “objective function” needs to be minimized.
- Measured solutions of BHT-QAOA, as the “energy cost” of the objective function.
- Previously calculated ɣ and β, as their “numerical values” need to be optimized.
4. Results and Discussion
- An arbitrary Boolean problem in POS structure, as stated in Equation (1) above and shown in Figure 1.
- An arbitrary Boolean problem in SOP structure, as stated in Equation (10) below and shown in Figure 8a.
- 3.
- An arbitrary Boolean problem in ESOP structure, as stated in Equation (11) below and shown in Figure 8b.
- 4.
- 5.
- A 4-bit conditioned half-adder digital circuit, which is ORing two 1-bit sums and then ANDing them with one 1-bit carry-out, as stated in Equation (13) below and demonstrated in Figure 8e,f.
- The initially randomized numerical values of ɣ and β for HC and HM, respectively.
- The noisy simulation models (AerSimulator and Aer-EstimatorV2), which are utilized for simulating BHT-QAOA, in the classical domain.
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Conflicts of Interest
References
- Farhi, E.; Goldstone, J.; Gutmann, S. A quantum approximate optimization algorithm. arXiv 2014. [Google Scholar] [CrossRef]
- Farhi, E.; Goldstone, J.; Gutmann, S.; Neven, H. Quantum algorithms for fixed qubit architectures. arXiv 2017. [Google Scholar] [CrossRef]
- Goemans, M.X.; Williamson, D.P. 878-approximation algorithms for max cut and max 2sat. In Proceedings of the Twenty-Sixth Annual ACM Symposium on the Theory of Computing, Montréal, QC, Canada, 23–25 May 1994; pp. 422–431. [Google Scholar]
- Rendl, F.; Rinaldi, G.; Wiegele, A. Solving max-cut to optimality by intersecting semidefinite and polyhedral relaxations. Math. Program. 2010, 121, 307–335. [Google Scholar] [CrossRef]
- Grover, L.K. A fast quantum mechanical algorithm for database search. In Proceedings, 28th Annual ACM Symposium on the Theory of Computing; ACM Press: New York, NY, USA, 1996; pp. 212–219. [Google Scholar]
- Grover, L.K. Quantum mechanics helps in searching for a needle in a haystack. Phys. Rev. Lett. 1997, 79, 325. [Google Scholar] [CrossRef]
- Grover, L.K. A framework for fast quantum mechanical algorithms. In Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing; ACM Digital Library: New York, NY, USA, 1998; pp. 53–62. [Google Scholar]
- Al-Bayaty, A.; Perkowski, M. A concept of controlling Grover diffusion operator: A new approach to solve arbitrary Boolean-based problems. Res. Sq. 2023. [Google Scholar] [CrossRef]
- Moussa, C.; Wang, H.; Bäck, T.; Dunjko, V. Unsupervised strategies for identifying optimal parameters in quantum approximate optimization algorithm. EPJ Quantum Technol. 2022, 9, 11. [Google Scholar] [CrossRef]
- Amosy, O.; Danzig, T.; Lev, O.; Porat, E.; Chechik, G.; Makmal, A. Iteration-free quantum approximate optimization algorithm using neural networks. Quantum Mach. Intell. 2024, 6, 38. [Google Scholar] [CrossRef]
- Herrman, R.; Lotshaw, P.C.; Ostrowski, J.; Humble, T.S.; Siopsis, G. Multi-angle quantum approximate optimization algorithm. Sci. Rep. 2022, 12, 6781. [Google Scholar] [CrossRef] [PubMed]
- Wurtz, J.; Lykov, D. Fixed-angle conjectures for the quantum approximate optimization algorithm on regular MaxCut graphs. Phys. Rev. A 2021, 104, 052419. [Google Scholar] [CrossRef]
- Crooks, G.E. Performance of the quantum approximate optimization algorithm on the maximum cut problem. arXiv 2018. [Google Scholar] [CrossRef]
- Fernández-Pendás, M.; Combarro, E.F.; Vallecorsa, S.; Ranilla, J.; Rúa, I.F. A study of the performance of classical minimizers in the quantum approximate optimization algorithm. J. Comput. Appl. Math. 2022, 404, 113388. [Google Scholar] [CrossRef]
- Powell, M.J.D.; Gomez, S. Advances in Optimization and Numerical Analysis; Gomez, S., Hennart, J.P., Eds.; Springer: Dordrecht, The Netherlands, 1994; Volume 4, pp. 51–67. ISBN 978-0792326731. [Google Scholar]
- Powell, M.J.D. A view of algorithms for optimization without derivatives. Math. Today-Bull. Inst. Math. Its Appl. 2007, 43, 170–174. [Google Scholar]
- Cerezo, M.; Arrasmith, A.; Babbush, R.; Benjamin, S.C.; Endo, S.; Fujii, K.; McClean, J.R.; Mitarai, K.; Yuan, X.; Cincio, L.; et al. Variational quantum algorithms. Nat. Rev. Phys. 2021, 3, 625–644. [Google Scholar] [CrossRef]
- Wecker, D.; Hastings, M.B.; Troyer, M. Progress towards practical quantum variational algorithms. Phys. Rev. A 2015, 92, 042303. [Google Scholar] [CrossRef]
- Tilly, J.; Chen, H.; Cao, S.; Picozzi, D.; Setia, K.; Li, Y.; Grant, E.; Wossnig, L.; Rungger, I.; Booth, G.H.; et al. The variational quantum eigensolver: A review of methods and best practices. Phys. Rep. 2022, 986, 1–128. [Google Scholar] [CrossRef]
- Figgatt, C.; Maslov, D.; Landsman, K.A.; Linke, N.M.; Debnath, S.; Monroe, C. Complete 3-qubit Grover search on a programmable quantum computer. Nat. Commun. 2017, 8, 1918. [Google Scholar] [CrossRef] [PubMed]
- Wakerly, J.F. Digital Design: Principles and Practices, 4th ed.; Pearson Education: New Delhi, India, 2014; ISBN 978-0131863897. [Google Scholar]
- Zhang, L.X.; Huang, W. A note on the invariance principle of the product of sums of random variables. Electron. Commun. Probab. 2007, 12, 59–64. [Google Scholar]
- Zimmermann, R.; Tran, D.Q. Optimized synthesis of sum-of-products. In Thrity-Seventh Asilomar Conference on Signals, Systems & Computers; IEEE: New York, NY, USA, 2003; pp. 867–872. [Google Scholar]
- Mishchenko, A.; Perkowski, M. Fast heuristic minimization of exclusive sums-of-products. In 5th Int. Workshop on Applications of the Reed-Muller Expansion in Circuit Design; Mississippi State University: Starkville, MS, USA, 2001; pp. 242–250. [Google Scholar]
- Sasao, T. EXMIN2: A simplification algorithm for exclusive-or-sum-of-products expressions for multiple-valued-input two-valued-output functions. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 1993, 12, 621–632. [Google Scholar] [CrossRef]
- Ibrahimi, M.; Kanoria, Y.; Kraning, M.; Montanari, A. The set of solutions of random XORSAT formulae. In Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms; Siam: Bangkok, Thailand, 2012; pp. 760–779. [Google Scholar]
- Soos, M.; Meel, K.S. BIRD: Engineering an efficient CNF-XOR SAT solver and its applications to approximate model counting. Proc. AAAI Conf. Artif. Intell. 2019, 33, 1592–1599. [Google Scholar] [CrossRef]
- Stankovic, R.S.; Sasao, T. A discussion on the history of research in arithmetic and Reed-Muller expressions. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 2001, 20, 1177–1179. [Google Scholar] [CrossRef]
- Kurgalin, S.; Borzunov, S. Concise Guide to Quantum Computing: Algorithms, Exercises, and Implementations; Springer: Cham, Switzerland, 2021; Volume 7, pp. 37–43. ISBN 978-3030650513. [Google Scholar]
- Hadfield, S. On the representation of Boolean and real functions as Hamiltonians for quantum computing. ACM Trans. on Quantum Comput. (TQC) 2021, 2, 1–21. [Google Scholar] [CrossRef]
- Lavrijsen, W.; Tudor, A.; Müller, J.; Iancu, C.; De Jong, W. Classical optimizers for noisy intermediate-scale quantum devices. In 2020 IEEE International Conference on Quantum Computing and Engineering (QCE); IEEE: New York, NY, USA, 2020; pp. 267–277. [Google Scholar]
- Boulebnane, S.; Montanaro, A. Solving Boolean satisfiability problems with the quantum approximate optimization algorithm. arXiv 2022. [Google Scholar] [CrossRef]
- Akshay, V.; Philathong, H.; Morales, M.E.; Biamonte, J.D. Reachability deficits in quantum approximate optimization. Phys. Rev. Lett. 2020, 124, 090504. [Google Scholar] [CrossRef] [PubMed]
- Mandl, A.; Barzen, J.; Bechtold, M.; Leymann, F.; Wild, K. Amplitude amplification-inspired QAOA: Improving the success probability for solving 3sat. Quantum Sci. Technol. 2024, 9, 015028. [Google Scholar] [CrossRef]
- Lin, C.Y.Y.; Zhu, Y. Performance of QAOA on typical instances of constraint satisfaction problems with bounded degree. arXiv 2016. [Google Scholar] [CrossRef]
- Bärtschi, A.; Eidenbenz, S. Grover mixers for QAOA: Shifting complexity from mixer design to state preparation. In 2020 IEEE International Conference on Quantum Computing and Engineering (QCE); IEEE: New York, NY, USA, 2020; pp. 72–82. [Google Scholar]
- Zhang, Z.; Paredes, R.; Sundar, B.; Quiroga, D.; Kyrillidis, A.; Duenas-Osorio, L.; Pagano, G.; Hazzard, K.R. Grover-QAOA for 3-sat: Quadratic speedup, fair-sampling, and parameter clustering. arXiv 2024. [Google Scholar] [CrossRef]
- Weidenfeller, J.; Valor, L.C.; Gacon, J.; Tornow, C.; Bello, L.; Woerner, S.; Egger, D.J. Scaling of the quantum approximate optimization algorithm on superconducting qubit based hardware. Quantum 2022, 6, 870. [Google Scholar] [CrossRef]
- Blekos, K.; Brand, D.; Ceschini, A.; Chou, C.H.; Li, R.H.; Pandya, K.; Summer, A. A review on quantum approximate optimization algorithm and its variants. Phys. Rep. 2024, 1068, 1–66. [Google Scholar] [CrossRef]
- Govia, L.C.G.; Poole, C.; Saffman, M.; Krovi, H.K. Freedom of the mixer rotation axis improves performance in the quantum approximate optimization algorithm. Phys. Rev. A 2021, 104, 062428. [Google Scholar] [CrossRef]
- Bravyi, S.; Kliesch, A.; Koenig, R.; Tang, E. Obstacles to variational quantum optimization from symmetry protection. Phys. Rev. Lett. 2020, 125, 260505. [Google Scholar] [CrossRef] [PubMed]
- Golden, J.; Bärtschi, A.; O’Malley, D.; Eidenbenz, S. Threshold-based quantum optimization. In 2021 IEEE International Conference on Quantum Computing and Engineering (QCE); IEEE: New York, NY, USA, 2021; pp. 137–147. [Google Scholar]
- Wang, Z.; Rubin, N.C.; Dominy, J.M.; Rieffel, E.G. XY mixers: Analytical and numerical results for the quantum alternating operator ansatz. Phys. Rev. A 2020, 101, 012320. [Google Scholar] [CrossRef]
- Vijendran, V.; Das, A.; Koh, D.E.; Assad, S.M.; Lam, P.K. An expressive ansatz for low-depth quantum approximate optimisation. Quantum Sci. Technol. 2024, 9, 025010. [Google Scholar] [CrossRef]
- Sarmina, B.G.; Sun, G.H.; Dong, S.H. Principal component analysis and t-distributed stochastic neighbor embedding analysis in the study of quantum approximate optimization algorithm entangled and non-entangled mixing operators. Entropy 2023, 25, 1499. [Google Scholar] [CrossRef] [PubMed]
- Yarkoni, S.; Raponi, E.; Bäck, T.; Schmitt, S. Quantum annealing for industry applications: Introduction and review. Rep. Prog. Phys. 2022, 85, 104001. [Google Scholar] [CrossRef]
- Morita, S.; Nishimori, H. Mathematical foundation of quantum annealing. J. Math. Phys. 2008, 49, 125210. [Google Scholar] [CrossRef]
- Ebendt, R.; Fey, G.; Drechsler, R. Advanced BDD Optimization; Springer: Dordrecht, The Netherlands, 2005; ISBN 978-0387254531. [Google Scholar]
- Wille, R.; Drechsler, R. Effect of BDD optimization on synthesis of reversible and quantum logic. Electron. Notes Theor. Comput. Sci. 2010, 253, 57–70. [Google Scholar] [CrossRef]
- Karimi, N.; Elyasi, S.N.; Yahyavi, M. Implementation and measurement of quantum entanglement using IBM quantum platforms. Phys. Scr. 2024, 99, 045121. [Google Scholar] [CrossRef]
- Wille, R.; Van Meter, R.; Naveh, Y. IBM’s Qiskit tool chain: Working with and developing for real quantum computers. In 2019 Design, Automation & Test in Europe Conf. & Exhibition (DATE); IEEE: New York, NY, USA, 2019; pp. 1234–1240. [Google Scholar]
- Georgopoulos, K.; Emary, C.; Zuliani, P. Modeling and simulating the noisy behavior of near-term quantum computers. Phys. Rev. A 2021, 104, 062432. [Google Scholar] [CrossRef]
- Rao, P.; Yu, K.; Lim, H.; Jin, D.; Choi, D. Quantum amplitude estimation algorithms on IBM quantum devices. In Quantum Communications and Quantum Imaging XVIII; SPIE: St Bellingham, WA, USA, 2020; Volume 11507, pp. 49–60. [Google Scholar]
- Simonis, H. Sudoku as a constraint problem. In CP Workshop on Modeling and Reformulating Constraint Satisfaction Problems; Citeseer: Sitges, Spain, 2005; pp. 13–27. [Google Scholar]
- Lynce, I.; Ouaknine, J. Sudoku as a SAT problem. In Proceedings of the 9th International Symposium on Artificial Intelligence and Mathematics (AI&M), Fort Lauderdale, FL, USA, 4–6 January 2006. [Google Scholar]
Oracular Problems | Number of Qubits | Number of Multi-Controlled Gates | Quantum Circuit Required a Mirror? | ||||
---|---|---|---|---|---|---|---|
Inputs | Ancillae (with fqubit) | Total | Feynman (CX) | 3-bit Toffoli | 4-bit Toffoli | ||
Boolean oracle in POS structure | 3 | 4 | 7 | 0 | 4 | 3 | Yes |
Boolean oracle in ESOP structure | 3 | 1 | 4 | 0 | 1 | 2 | No |
Phase oracle | 3 | 0 | 3 | 1 (as a CZ) | 2 (as a CCZ) | 0 | No |
Gate | Type | f(x) | Hf |
---|---|---|---|
Feynman (CX) | Boolean | qj ⊕ fqubit = qj | |
Toffoli | Boolean | qj ∧ qk | |
n-bit Toffoli | Boolean |
Rules | Gate | Type | g(x) | Hg |
---|---|---|---|---|
Rule 1 | Pauli-Z (Z) | Phase | ||
Rule 2 | CZ | Phase | ||
Rule 3 | MCZ | Phase | ||
Rule 4 | Pauli-X (X) | Phase | Invert signs (±) of all jth qubits in ZQ |
Entities in a Boolean Oracle → Entities in a Phase Oracle | |||||
---|---|---|---|---|---|
Qubits and Quantum Gates (Entities) | Arbitrary Problem in POS | Arbitrary Problem in SOP | Arbitrary Problem in ESOP | 2 × 2 Sudoku Game | 4-bit Conditioned Half-Adder Circuit |
Input qubits | 3 → 3 | 3 → 3 | 3 → 3 | 4 → 4 | 4 → 4 |
Ancilla qubits | 4 → 0 | 4 → 0 | 1 → 0 | 5 → 0 | 9 → 0 |
Pauli-X (X) | 16 → 8 | 15 → 6 | 6 → 6 | 0 → 8 | 12 → 2 |
Feynman (CX) | 0 → 1 | 0 → 1 | 0 → 2 | 16 → 0 | 12 → 0 |
3-bit Toffoli | 4 → 2 | 4 → 2 | 2 → 1 | – | 11 → 1 |
4-bit Toffoli | 3 → 0 | 3 → 0 | 1 → 0 | 0 → 2 | 0 → 1 |
5-bit Toffoli | – | – | – | 1 → 0 | – |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Al-Bayaty, A.; Perkowski, M. BHT-QAOA: The Generalization of Quantum Approximate Optimization Algorithm to Solve Arbitrary Boolean Problems as Hamiltonians. Entropy 2024, 26, 843. https://doi.org/10.3390/e26100843
Al-Bayaty A, Perkowski M. BHT-QAOA: The Generalization of Quantum Approximate Optimization Algorithm to Solve Arbitrary Boolean Problems as Hamiltonians. Entropy. 2024; 26(10):843. https://doi.org/10.3390/e26100843
Chicago/Turabian StyleAl-Bayaty, Ali, and Marek Perkowski. 2024. "BHT-QAOA: The Generalization of Quantum Approximate Optimization Algorithm to Solve Arbitrary Boolean Problems as Hamiltonians" Entropy 26, no. 10: 843. https://doi.org/10.3390/e26100843