Skip to content

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

Open
wants to merge 13 commits into
base: add_measurements_from_counts
Choose a base branch
from

Conversation

lillian542
Copy link
Contributor

@lillian542 lillian542 commented Apr 29, 2025

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:

  • No consolidation of Pauli operations and/or byproduct operations
  • Byproducts are applied online after each measurement protocol is complete, no offline corrections
  • we use the qubit manager to allocate qubits on the tape before execution (not capture compatible, we unroll all program structure)

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]


@transform
def convert_to_mbqc_formalism(tape):
if len(tape.measurements) != 1 or not isinstance(tape.measurements[0], SampleMP):
Copy link
Contributor Author

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

Copy link
Contributor Author

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.

@lillian542 lillian542 marked this pull request as ready for review May 7, 2025 21:26

This comment was marked as resolved.

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