Skip to content

Add warm-start QAOA tutorial#5064

Open
henryzou50 wants to merge 39 commits into
mainfrom
add-warm-start-qaoa-tut
Open

Add warm-start QAOA tutorial#5064
henryzou50 wants to merge 39 commits into
mainfrom
add-warm-start-qaoa-tut

Conversation

@henryzou50
Copy link
Copy Markdown
Collaborator

Replaces #5039 — moved branch to upstream so CI can access the QiskitRuntimeService token. See #5039 for prior discussion.

Adds a new tutorial demonstrating how to warm-start QAOA on Max-Cut
problems by initializing the circuit from a continuous relaxation
solution (Egger, Mareček, Woerner 2020), using the
qiskit-addon-opt-mapper package. Registers it in the tutorials TOC
and index, sets reviewer notifications, and excludes it from
notebook CI like other tutorials.
@henryzou50 henryzou50 requested a review from a team May 4, 2026 17:41
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@qiskit-bot
Copy link
Copy Markdown
Contributor

One or more of the following people are relevant to this code:

  • @nathanearnestnoble

@henryzou50 henryzou50 self-assigned this May 4, 2026
Comment thread docs/tutorials/_toc.json Outdated
Comment thread docs/tutorials/index.mdx Outdated
Comment thread docs/tutorials/warm-start-qaoa.ipynb Outdated
Comment thread docs/tutorials/warm-start-qaoa.ipynb Outdated
Comment thread docs/tutorials/warm-start-qaoa.ipynb Outdated
Comment thread docs/tutorials/warm-start-qaoa.ipynb Outdated
Comment thread docs/tutorials/warm-start-qaoa.ipynb Outdated
Comment thread docs/tutorials/warm-start-qaoa.ipynb Outdated
Comment thread docs/tutorials/warm-start-qaoa.ipynb Outdated
Comment thread docs/tutorials/warm-start-qaoa.ipynb
henryzou50 and others added 6 commits May 5, 2026 11:38
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
henryzou50 and others added 7 commits May 5, 2026 18:07
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
abbycross
abbycross previously approved these changes May 6, 2026
Copy link
Copy Markdown
Collaborator

@abbycross abbycross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All set from my side, thanks! @nathanearnestnoble final review?

@nathanearnestnoble
Copy link
Copy Markdown
Collaborator

@t-imamichi plans to review this -- lets come back once that is done.

@t-imamichi
Copy link
Copy Markdown
Member

t-imamichi commented May 13, 2026

The tutorial looks good overall. I have some minor comments as follows.

  1. Cell [3]: Since opt-mapper includes Maxcut class , Cell [3] and "Large Scale Hardware Example" section can be simplified with the class.
  2. Cell [7]: I suggest using qaoa_ansatz link to generate the standard QAOA ansatz.
  3. Cell [14]: It would be nice to compare the probabilities of bitstrings with the optimal cut value 4 so that we can see the difference between the standard QAOA and the warm-start QAOA. (not a strong opinion)

- Build max-cut problems with the Maxcut application class instead of
  manually expanding the QUBO objective, in both the small-scale and
  large-scale sections
- Generate the standard QAOA ansatz with qiskit.circuit.library.qaoa_ansatz
  rather than a hand-rolled builder; keep the custom WS-QAOA builder since
  its R_Y-R_Z-R_Y mixer is not a sum of Paulis
- Add a bar chart comparing the probability of measuring each cut value
  for standard QAOA vs. WS-QAOA, highlighting the optimal cut
@henryzou50
Copy link
Copy Markdown
Collaborator Author

The tutorial looks good overall. I have some minor comments as follows.

1. Cell [3]: Since opt-mapper includes `Maxcut` [class](https://qiskit.github.io/qiskit-addon-opt-mapper/stubs/qiskit_addon_opt_mapper.applications.Maxcut.html) , Cell [3] and "Large Scale Hardware Example" section can be simplified with the class.

2. Cell [7]: I suggest using `qaoa_ansatz` [link](https://quantum.cloud.ibm.com/docs/en/api/qiskit/qiskit.circuit.library.qaoa_ansatz) to generate the standard QAOA ansatz.

3. Cell [14]: It would be nice to compare the probabilities of bitstrings with the optimal cut value 4 so that we can see the difference between the standard QAOA and the warm-start QAOA. (not a strong opinion)

Thanks @t-imamichi for the review! I've addressed all three comments:

Cell [3]: Switched to the Maxcut application class, both the small-scale Cell [3] and the "Large Scale Hardware Example" section now build the problem with Maxcut(G).to_optimization_problem() instead of manually expanding the QUBO objective. Updated the imports and surrounding markdown accordingly.

Cell [7]: The standard QAOA ansatz is now generated with qaoa_ansatz from qiskit.circuit.library. I kept the custom builder for WS-QAOA only, since its per-qubit mixer $R_Y(\theta),R_Z(-2\beta),R_Y(-\theta)$ isn't expressible as a sum of Paulis — let me know if you'd prefer it routed through qaoa_ansatz with a custom mixer/initial state as well.

Cell [14]: Added a bar chart comparing the probability distribution over cut values for standard QAOA vs. WS-QAOA, with the optimal cut (4) highlighted, plus a printed P(cut = 4) comparison. This makes the contrast clear, as WS-QAOA concentrates almost all of its probability mass on the optimal cut, while standard QAOA spreads it across suboptimal partitions.

The notebook has been re-run with refreshed outputs.

@t-imamichi
Copy link
Copy Markdown
Member

t-imamichi commented May 22, 2026

Thank you @henryzou50 for reflecting my comments. LGTM.
As for qaoa_ansatz, you are right. It cannot generate WS-QAOA ansatz easily. I posted a comment.
It makes sense to have a custom ansatz function for WS-QAOA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants