Add support for the triangular-lattice based embedding#55
Open
isPANN wants to merge 3 commits intoQuEraComputing:mainfrom
Open
Add support for the triangular-lattice based embedding#55isPANN wants to merge 3 commits intoQuEraComputing:mainfrom
isPANN wants to merge 3 commits intoQuEraComputing:mainfrom
Conversation
Contributor
|
I have tested this PR locally, and verified the correctness. The documentation can be built successfully locally. The code quality is also good. @Wang-Shengtao Could you please help approve the CI runs, merge this PR and tag a new patch version (since no incompitible changes) by commenting here: #41 |
GiggleLiu
approved these changes
Sep 10, 2025
Contributor
GiggleLiu
left a comment
There was a problem hiding this comment.
LGTM. please bump the version to 0.5.2.
Member
|
@weinbe58 Please see above - please review, merge and tag a new version. |
Contributor
|
Hey. The arXiv paper related to this PR has been released here: https://arxiv.org/abs/2510.25249 . Is it possible to merge the PR so that the link in the article could function properly. |
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.
This pull request introduces support for mapping graphs onto triangular lattices in addition to the existing square lattice approach, enabling more flexible and realistic modeling for quantum hardware with different connectivity constraints. The changes include new grid types, a new mapping mode (
TriangularWeighted), and significant refactoring to generalize grid spacing and physical positioning logic. An example and documentation updates are also provided to demonstrate and explain the new functionality.Triangular lattice support and grid generalization:
SquareGridandTriangularGrid(with customizable column offset) as subtypes of a newAbstractGridType, and updatedGridGraphto be parameterized by grid type. The physical position calculation and neighbor logic are now grid-type aware, supporting both square and triangular lattices.TriangularWeightedand exported it, along with the new grid types, for external use. [1] [2]GridSpacingstructure, allowing flexible row and column spacing for different grid types. All mapping and gadget-placement functions now use this abstraction, and spacing is stored with the mapping grid and results. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Triangular mapping implementation:
TriangularWeightedmapping logic, including grid construction, overhead calculation, and integration with simplification and gadget routines. The mapping functions now select grid type and spacing based on the chosen mode. [1] [2] [3] [4] [5]Documentation and examples:
examples/weighted_lattice_comparison.jldemonstrating and comparing weighted graph mapping on square and triangular lattices, including visualization and solution verification.Code organization:
triangular.jlfile in the main module for triangular lattice support.utils.jlinclude to immediately afterCore.jlfor improved organization.