Skip to content
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

Add class for measurement outcomes and nodes and edges on the syndrome graph #318

Open
tommasopeduzzi opened this issue Feb 15, 2023 · 1 comment

Comments

@tommasopeduzzi
Copy link
Contributor

What is the expected enhancement?

Currently, we use a string to track the measurement outcomes from code circuits. By adding a class for this instead of using a string, we can eliminate a whole range of cryptic errors when, for example, passing the results to a incorrectly configured decoder.

For the data on the edges and the nodes of the syndrome graph, we currently use dictionaries. Adding classes for nodes and edges solves the same issues as above.
Each decoder could create a class that inherits from the node base class and can store the required information in there. The same thing could be done for edges.
It would also make it easier to differentiate between bulk and boundary nodes, as they can be separate classes.
DecodingGraph would take two additional arguments in in its constructor, which are the node and the edge class. By default these would be the base classes.
Not only would this change make the code safer, it would make it easier to easily track nodes, which could introduce some speed-ups.

@tommasopeduzzi
Copy link
Contributor Author

#334 would partially complete this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant