Open
Conversation
Your preview is ready 🎉!You can view your changes here
|
…ts in FALQON demo Fixes PennyLaneAI#1726 (PennyLaneAI#1726) - Correct Hc formula: coefficient 3 -> 3/4 (hidden normalization in edge_driver) - Add explanatory note about the 1/4 factor from pennylane.qaoa.cost.edge_driver - Correct commutator [Hd, Hc] formula: first-sum coeff 3->3/4, second-sum coeff 3->1 - Correct i[Hd, Hc] formula: first-sum coeff 6->3/2, second-sum coeff 6->2 - Fix build_hamiltonian(): edge term coefficients 6->1.5, second-sum 6->2 - Add note block showing qml.commutator as a general-purpose alternative - Bump dateOfLastModification in metadata.json
69dae19 to
99540bb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: fix: correct Hc and commutator formulas, and build_hamiltonian coefficients in FALQON demo
Summary:
The FALQON demo's cost Hamiltonian formula, commutator formula, and build_hamiltonian() function all used incorrect coefficients. The root cause is a hidden 1/4 normalization applied by
pennylane.qaoa.cost.edge_driver(used internally byqaoa.max_clique) that was not reflected in the demo's written math.Specific corrections:
H_cformula: edge coefficient3→3/4; added a note explaining theedge_drivernormalization[H_d, H_c]formula: first-sum coefficient3→3/4, second-sum3→1i[H_d, H_c]formula: first-sum coefficient6→3/2, second-sum6→26→1.5, second-sum6→2.. note::block showingqml.commutatoras a concise general-purpose alternativedateOfLastModificationin metadata.jsonThe FALQON algorithm converged correctly before and after this fix — the sign of β_k is preserved by the operator structure, so the guarantee d/dt ⟨H_c⟩ ≤ 0 holds regardless. This PR makes the written math match the actual code output.
Relevant references:
edge_driverAPI: https://docs.pennylane.ai/en/stable/code/api/pennylane.qaoa.cost.edge_driver.htmlPossible Drawbacks:
None. The algorithm behaviour is unchanged; only the mathematical exposition is corrected.
Related GitHub Issues:
Closes #1726