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

Serialise circuit entrypoints #378

Open
aborgna-q opened this issue Jun 3, 2024 · 0 comments
Open

Serialise circuit entrypoints #378

aborgna-q opened this issue Jun 3, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@aborgna-q
Copy link
Collaborator

#370 added a Circuit struct with a pointer to the entry point of the circuit in the referenced hugr.
This struct cannot use the hugr serialization format directly, since it needs to store the entry-point pointer somewhere.

My proposal for implementing Serialize/Deserialize is to store the information in the module's metadata before using hugr's serialization;

  • If the root is a DFG, don't do anything
  • If the root is a module, add a tket2::entrypoint metadata entry pointing to the right children.

If the circuit entrypoint is deeply nested inside another DFG, return an error.

When deserialising, check for the metadata value or default to the root (if valid).

@aborgna-q aborgna-q added the enhancement New feature or request label Jun 3, 2024
@aborgna-q aborgna-q added the good first issue Good for newcomers label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant