Skip to main content

View on GitHub

Open this notebook in GitHub to run it yourself
This notebook demonstrates the Classiq performance re. the Quantum Approximate Optimization Algorithm (QAOA), focusing on the Max Clique problem.

  1. Calling the Built-in QAOA
This section calls the built-in QAOA of Classiq, constructing the corresponding quantum model from a combinatorial optimization Pyomo model.

  1. Generating a Pyomo Model
Setting a specific problem and some hyperparameters.

1.2 Constructing, Synthesizing, and Running a QAOA Model

  1. Comparing to Qiskit
We use qiskit version
  1. Qiskit has no module in which to specify a generic optimization problem; therefore, you have to do the preprocessing and post-processing yourself.
Retrieve the Hamiltonian that enters into the VQE.
Define a function for running QAOA on Qiskit and returning the results. **Due to long runtime the code for generating the qiskit data is commented out and the results are hard-coded in the notebook. For running the full code please uncomment the code three cells below.**
The same QAOA with Qiskit

  1. Plotting the Data
Output:
output