-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FTQC] Add Lattice class to ftqc module #6958
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a bunch @multiphaseCFD
Looking good -- I think we should be able to get this in with another pass. A few thoughts from my side:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good 🚀 I've suggested a few small adjustments, I think this is almost ready to go :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a bunch Shuli --- happy to see this go in.
We can always adapt anything we need in follow-up works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks @multiphaseCFD! 🎉
Co-authored-by: lillian542 <[email protected]>
Co-authored-by: lillian542 <[email protected]>
Before submitting
Please complete the following checklist when submitting a PR:
All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to the
test directory!
All new functions and code must be clearly commented and documented.
If you do make documentation changes, make sure that the docs build and
render correctly by running
make docs
.Ensure that the test suite passes, by running
make test
.Add a new entry to the
doc/releases/changelog-dev.md
file, summarizing thechange, and including a link back to the PR.
The PennyLane source code conforms to
PEP8 standards.
We check all of our code against Pylint.
To lint modified files, simply
pip install pylint
, and thenrun
pylint pennylane/path/to/file.py
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Context:
[SC-84004]
Fault-Tolerant Quantum Computing (FTQC) and Measurement-Based Quantum Computing (MBQC) require efficient representation and manipulation of qubit lattices. These lattices define the connectivity of qubits, which is crucial for implementing quantum operations and error correction.
Description of the Change:
This PR introduces a Lattice class to represent qubit lattices using NetworkX graph objects. The Lattice class provides functionalities to:
Store and access lattice connectivity information.
Create lattices of various shapes (chain, rectangle, honeycomb, triangle, cubic) using the generate_lattice function.
Set and retrieve attributes on nodes (qubits) and edges (connections) to store additional information (e.g., stabilizers, entanglement).
Relabel nodes for indexing and manipulation.
This change enables the representation and manipulation of lattices, laying the groundwork for implementing Cluster State as well as Graph State within PennyLane.
Benefits:
Possible Drawbacks:
Related GitHub Issues: