Repository navigation
Remove the qp.qaoa module - #10249
Conversation
Removes `pennylane/qaoa` (cost, cycle, layers, mixers) along with its tests, API docs page, `tach.toml` module entry and the documentation-tests ignore rule. `QAOAEmbedding` is a template and is unaffected. Authored with assistance from an AI coding assistant. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10249 +/- ##
==========================================
- Coverage 99.41% 99.40% -0.01%
==========================================
Files 603 598 -5
Lines 66975 66593 -382
==========================================
- Hits 66580 66200 -380
+ Misses 395 393 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
andrijapau
left a comment
There was a problem hiding this comment.
What (if any) demos are affected by this?
Searched PennyLaneAI/demos @ master. Five demos import the module directly:
|
Can we add a story to this iteration to make sure we fix those? |
Context:
Part of the ongoing removal of classic PennyLane modules for PennyLane2, following
the same pattern as
qp.fourier(#10212),qp.noise(#10214),qp.qcut(#10235)and
qp.qnn(#10247).Description of the Change:
Removes the
pennylane.qaoamodule:pennylane/qaoa/(cost.py,cycle.py,layers.py,mixers.py,__init__.py)and
tests/test_qaoa.py.from pennylane import qaoafrompennylane/__init__.py.pennylane.qaoamodule block fromtach.toml.doc/code/qp_qaoa.rstand itsdoc/index.rsttoctree entry.--ignore=pennylane/qaoarule fromdocumentation-tests.yml.doc/development/deprecations.rstanddoc/releases/changelog-dev.md.This covers the mixer Hamiltonians (
x_mixer,xy_mixer,bit_flip_mixer), the costHamiltonians (
maxcut,max_independent_set,min_vertex_cover,max_clique,max_weight_cycle,bit_driver,edge_driver), the ansatz layers (cost_layer,mixer_layer) and thepennylane.qaoa.cyclehelpers.Deliberately left alone:
QAOAEmbeddingis a template underpennylane/templates/embeddings/, not part of thismodule, and is unaffected.
rustworkx/networkxstay as dependencies; both are used elsewhere in the package.qp.qcut,qp.qaoahad no pytest marker, no dedicated CI job and no extrasgroup, so there is nothing to remove from
pytest.ini,conftest.pyorpyproject.toml.Benefits:
Less surface area to maintain and migrate to
Operator2/ PennyLane2.Possible Drawbacks:
Breaking change for anyone using
qp.qaoa. There is no in-tree replacement.Related GitHub Issues:
[sc-132149]