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

How to deal with qubits when they are function/operation parameters #10

Open
jakezweifler opened this issue Oct 31, 2022 · 1 comment
Open
Assignees
Labels
question Further information is requested

Comments

@jakezweifler
Copy link
Collaborator

jakezweifler commented Oct 31, 2022

When initializing a qubit using SUse or SUseS, we can add the qubit to the context. However, what should be done when elaborating function parameters? For reference, this decision needs to be made in the curry function on line 115 of Elab.ml.

@k4rtik k4rtik added the question Further information is requested label Oct 31, 2022
@k4rtik
Copy link
Member

k4rtik commented Oct 31, 2022

I think while declaring the callable we may need to add the arguments to the context to be able to type check the body, but when we are done with the body, the local arguments/parameters will need to be removed from the context. This is similar to entering a smaller scope and exiting it.

@jakezweifler does that answer your question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants