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

Compile constructors #17

Closed
croyzor opened this issue Jul 25, 2024 · 0 comments · Fixed by #22
Closed

Compile constructors #17

croyzor opened this issue Jul 25, 2024 · 0 comments · Fixed by #22

Comments

@croyzor
Copy link
Collaborator

croyzor commented Jul 25, 2024

The only Constructors that we compile to hugr are True and False, as a proof of concept.
We could easily compile other constructors to ops in the brat hugr extension using the existing BRAT::Constructor type op.
It would also be nice to compile vector patterns, including literals!

croyzor added a commit that referenced this issue Aug 7, 2024
Allow lambda expressions to have multiple clauses employing pattern
matching logic just like what is done for top level definitions. This
improves expressiveness as previously we couldn't pattern match in
kernels that were defined as lambdas created by classical functions.

These multi-clause lambda expressions - "multilambdas" - are parsed
inside curly braces, as many lambda expressions separated by a `|`.

Closes #8, #17

---------

Co-authored-by: Alan Lawrence <alan.lawrence@quantinuum.com>
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 a pull request may close this issue.

1 participant