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

Serialization of TwoQubitQPDGate should not decompose it into two SingleQubitQPDGates #443

Open
garrison opened this issue Oct 27, 2023 · 0 comments
Labels
cutting QPD-based circuit cutting code qpd Related to quasi-probability decompositions serialization Related to serialization of our custom objects

Comments

@garrison
Copy link
Member

Assuming #417 is fixed upon merging #442, it will be possible to serialize the QPDGates. However, in the course of serializing a TwoQubitQPDGate, it will first be decomposed to two SingleQubitQPDGates. This is probably not desirable: it would almost certainly be better for a TwoQubitQPDGate to make it through a serialization/deserialization process unchanged.

To fix this, we can make TwoQubitQPDGate._define do nothing if basis_id is None, just like in SingleQubitQPDGate._define. However, we will need to provide users a straightforward way to decompose all (or perhaps some?) TwoQubitQPDGates in a circuit into SingleQubitQPDGates. Right now this can be accomplished with circuit.decompose(TwoQubitQPDGate), but this procedure would no longer work with the change suggested here. Whatever we do, we should be sure to document it carefully in the release notes.

@garrison garrison added qpd Related to quasi-probability decompositions cutting QPD-based circuit cutting code labels Oct 27, 2023
@garrison garrison added the serialization Related to serialization of our custom objects label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cutting QPD-based circuit cutting code qpd Related to quasi-probability decompositions serialization Related to serialization of our custom objects
Projects
None yet
Development

No branches or pull requests

1 participant