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

Merged
merged 90 commits into from
May 24, 2025
Merged

Transform to convert to MBQC formalism #7355

merged 90 commits into from
May 24, 2025

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]

Copy link
Contributor

@JerryChen97 JerryChen97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might help, though ugly
P.S. no it didn't

Copy link
Member

@mlxd mlxd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @lillian542
Nothing further from me

Copy link
Contributor

@joeycarter joeycarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🎉

Copy link
Contributor

@JerryChen97 JerryChen97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just one more good-to-have comment.

Copy link
Member

@multiphaseCFD multiphaseCFD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lillian542 for the nice work. Just wondering why qml.math is preferred over qml.numpy or numpy here.

@lillian542 lillian542 enabled auto-merge May 23, 2025 22:09
@lillian542 lillian542 added this pull request to the merge queue May 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 24, 2025
@lillian542 lillian542 added this pull request to the merge queue May 24, 2025
Merged via the queue into master with commit f03dc51 May 24, 2025
53 checks passed
@lillian542 lillian542 deleted the mbqc_transform branch May 24, 2025 02:06
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.

6 participants