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

feat: Scalar serialization and pyzx interop #33

Merged
merged 5 commits into from
May 6, 2024
Merged

Conversation

ABorgna
Copy link
Collaborator

@ABorgna ABorgna commented May 6, 2024

Adds an encoding definition for serialising scalars into the pyzx format.

  • Removed the ignore_scalar option in the encoder/decorder. We can now deserialise the full thing.
  • Added better error support during serialisation.
  • Exposed the scalar from python too. Uses pyzx.Scalar for the user-facing bindings. We just serialize-deserialize between the quizx and pyzx implementation.

The serialisation incurs a precision loss due to the different encodings between pyzx and quizx. We should look into this in the future to improve the situation.

@ABorgna ABorgna merged commit b19f3cf into master May 6, 2024
9 checks passed
@ABorgna ABorgna deleted the ab/scalar-work branch May 6, 2024 16:03
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

Successfully merging this pull request may close these issues.

1 participant