Add impls of Program node for various math operations#16107
Draft
ihincks wants to merge 10 commits intoQiskit:mainfrom
Draft
Add impls of Program node for various math operations#16107ihincks wants to merge 10 commits intoQiskit:mainfrom
ihincks wants to merge 10 commits intoQiskit:mainfrom
Conversation
This commit adds a new data structure to the new providers crate DataTree. The DataTree is a generic tree structure that will be used to define the operation ports in the QuantumProgram's tensor compute graph's nodes. Right now this is just one of the building blocks towards defining the QuantumProgram. As it isn't being used right now since the rest of the components don't exist yet, this is solely self tested. When subsequent components are added tests using the DataTree as part of Operation types and eventually in a QuantumProgram will be needed as well.
This commit adds a new type PathEntry that is used to outline a path through the DataTree into a leaf node. Along with this are two new methods to lookup a leaf node by a path and also to traverse the tree to get leaf nodes along with the path to that node.
This commit changes the type hierarchy for DataTree to move the struct from being a vec of enums of either leaves or branches. To each DataTree being an enum of either a leaf or branch and each branch contains a vec of DataTrees. This is a more natural form as the outer type can either be a leaf or branch and simplifies working with the tree.
Collaborator
|
One or more of the following people are relevant to this code:
|
Open
Coverage Report for CI Build 25187855166Coverage decreased (-0.2%) to 87.378%Details
Uncovered Changes
Coverage Regressions7 previously-covered lines in 2 files lost coverage.
Coverage Stats
💛 - Coveralls |
c8bea7a to
b429b8d
Compare
b429b8d to
a437668
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.
This PR closes #16031 by implementing ProgramNode for various math-y structs.
PR Stack
AI/LLM disclosure