A comprehensive Python implementation of the Quantum Approximate Optimization Algorithm (QAOA) for solving MAX-SAT problems including Max-Cut and MAX 3-SAT using Google's Cirq quantum computing framework.
A deep dive into hybrid quantum-classical computing with a comprehensive implementation of the Quantum Approximate Optimization Algorithm (QAOA) to solve NP-hard combinatorial optimization problems. This project tackles multiple variants of the Maximum Satisfiability (MAX-SAT) problem, including Max-Cut on ring graphs (MAX-2-SAT) and general MAX-3-SAT with arbitrary boolean clauses. The implementation features a robust pipeline built with Python and Google's Cirq framework. It constructs parameterized quantum circuits that encode problem Hamiltonians, using standard ZZ gates for Max-Cut and novel, custom-built 3-qubit gates for the more complex MAX-3-SAT instances. A classical Nelder-Mead optimizer iteratively refines the circuit parameters to navigate the solution space and find high-quality approximate solutions. The project includes extensive performance analysis, calculating approximation ratios by benchmarking QAOA results against a classical brute-force solver and demonstrating performance scaling with increased circuit depth.
TECHNOLOGIES USED
Python • Google Cirq
KEY METRICS
2 NP-Hard Problem Classes Solved
90%+ Approximation Ratios Achieved
Project Overview
This project demonstrates a complete implementation of QAOA, a hybrid quantum-classical algorithm that combines quantum circuits with classical optimization to solve combinatorial optimization problems. The implementation covers multiple MAX-SAT problem variants including:
MAX 2-SAT (Ring of Disagrees): Max-Cut problem on ring graphs
MAX 3-SAT: General 3-satisfiability problems with arbitrary boolean clauses
What is QAOA?
QAOA (Quantum Approximate Optimization Algorithm) is a variational quantum algorithm that:
Uses parameterized quantum circuits to prepare quantum states
Employs classical optimization to find optimal parameters
Provides approximate solutions to NP-hard combinatorial problems
Academic Paper: QAOA_for_MAX_SAT.pdf (included in docs/)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Academic Context
This project was developed as part of advanced quantum computing coursework at FAU Erlangen-Nuremberg under supervision of Professor Michael Hartmann, demonstrating:
Practical implementation of variational quantum algorithms
Integration of quantum and classical computing paradigms
Performance analysis and optimization techniques
Academic rigor in algorithm development and testing
Professional documentation and presentation skills
Acknowledgments
Professor Michael Hartmann - Project supervision and academic guidance
FAU Erlangen-Nuremberg - Academic institution and research support
Google Cirq Team - Excellent quantum computing framework
NetworkX Development Team - Graph theory and visualization tools
Contact
For questions, suggestions, or collaboration opportunities, please open an issue on GitHub.
Built for quantum computing research and education