-
Notifications
You must be signed in to change notification settings - Fork 657
Transform to convert to MBQC formalism #7355
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
base: add_measurements_from_counts
Are you sure you want to change the base?
Conversation
pennylane/ftqc/decomposition.py
Outdated
|
||
@transform | ||
def convert_to_mbqc_formalism(tape): | ||
if len(tape.measurements) != 1 or not isinstance(tape.measurements[0], SampleMP): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
counts should also be valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, while this is technically true for this transform, in general for FTQC we need samples
so we can resolve and correct issues with single-shot measurements, so not really useful. Sticking to sample
only.
Context:
We have a transform to go from an arbitrary circuit to the gateset compatible with textbook MBQC. Now we want to convert that the MBQC formalism, expressed using resource states, parametrized MCMs and byproduct corrections.
Description of the Change:
We add a transform that performs a simple conversion from that gate-set to the MBQC formalism. "Simple" here means:
This is a very direct, naive conversion to the MBQC formalism. But it does the thing, so it's a good place to start - and we can use it as a baseline for quantifying future improvements in our circuit conversion.
Benefits:
We can convert a circuit to a simple, un-optimized implementation of the same circuit in the MBQC formalism.
[sc-88533]