Skip to content

Add Broadcast to wire dialect #217

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

Closed
wants to merge 5 commits into from
Closed

Conversation

johnzl-777
Copy link
Contributor

@johnzl-777 johnzl-777 commented Apr 29, 2025

@weinbe58 and I are in agreement that the work on #209 should be mirrored (that is, the statement Broadcast that exists in the qubit dialect) should be present in the wire dialect as well.

It occurred to me during the development that Apply and Broadcast in BOTH dialects have identical structure and that it might be worth introducing a parent class to them to keep things DRY so I've gone ahead and done that. Phillip pointed out this not worth it for just two similar classes and I find myself in agreement

I don't know if this is related (I can try to create an MWE and file a bug report) but the pretty printing that used to work (even before I made modifications to the statements in the dialects) now seems to fail to find the default pretty print impl in statement. It just goes straight to saying the ABCMeta doesn't have it implemented which is a bit odd to me.

@johnzl-777 johnzl-777 changed the title Add Broadcast to wire dialect and subclasses Add Broadcast to wire dialect Apr 29, 2025
@johnzl-777 johnzl-777 closed this Apr 30, 2025
@johnzl-777 johnzl-777 deleted the john/add-broadcast-to-wire branch April 30, 2025 19:18
@johnzl-777 johnzl-777 mentioned this pull request Apr 30, 2025
weinbe58 pushed a commit that referenced this pull request May 1, 2025
This adds `broadcast` from the qubit dialect into the `wire` dialect as
well for squin. I added unit tests specifically for constprop as well
and took @weinbe58 's feedback to add things into the constprop impl.

I'll be very honest, I just carried over my work from #217 because I
think I did some improper merge and it broke something somewhere else 😅
and the CI failing but my local run working was annoying me too much.
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.

2 participants