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

Replace beer example with expanded alchemy example #262

Open
jon-wurtz opened this issue Feb 18, 2025 · 1 comment
Open

Replace beer example with expanded alchemy example #262

jon-wurtz opened this issue Feb 18, 2025 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@jon-wurtz
Copy link
Contributor

Not a blocker for open-source alpha.

In my opinion, the beer example is a bit simplistic. We should strive to include all features as examples in this dialect. Sure, we target compiler developers that "know" how MLIR works but unless we are exactly following previous precedent (and citing it everywhere!) users will still need to understand the particular structure of how we write code. Thus, the "cookbook" should be complete to give precedent to those prospective users.

I brought this up a few weeks ago, but an "alchemy" dialect might be appropriate as it can act as a simulacrum of quantum circuit execution and orchestrating external computations. We could even have a "magic state distillation" example haha. It can also act as a way to demonstrate rewrite passes by having a high level and low level dialect group.

For example, the high level dialect could be instantiating reagents (eye of neut, toe of frog or whatever), mixing them together (with possibly random results, there is that rewrite!) in ways that require real-time control flow and unknown types (abstract analysis and type lattice!) to generate potions or whatever. Then the low level dialect (rewrite!) could be allocating beakers and vials (atoms/qubits?!) and executing things on the register level (atom moves?!).

@jon-wurtz jon-wurtz added the documentation Improvements or additions to documentation label Feb 18, 2025
@Roger-luo
Copy link
Member

I think this either should be a separate example or is fixed by #276 now. Feel free to close the issue you don't intend to push for another example anymore.

On a side note, I'm planning to have more formal examples on some existing acamedic languages (e.g Mingsheng's quantum recursion, quantum loop etc.) as examples. But this is gonna be after open-source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants