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

Allow list in Measure function #210

Open
juanboschero opened this issue May 31, 2024 · 2 comments
Open

Allow list in Measure function #210

juanboschero opened this issue May 31, 2024 · 2 comments

Comments

@juanboschero
Copy link
Collaborator

The current Measure function allows a single Qubit object i.e Measure(Qubit(1)). If one wants multiple measures, the user needs to specify:

Measure(Qubit(0))
Measure(Qubit(1))
Measure(Qubit(2))
  1. Allow Measure to accept a list Measure([Qubit(0),Qubit(1),Qubit(2)])
  2. Allow Measure to accept indices Measure(qubits = [0,1,2])
  3. Allow measure all functionality when user does not specify a qubit, i.e Measure() performs a measure all
arcturusannamalai added a commit to RTLWorks/OpenSquirrel that referenced this issue Sep 2, 2024
- support the 1, 2 requests from the issue but not a empty Measure() object.
- updates repr() test for Measure object
@rturrado
Copy link
Contributor

rturrado commented Sep 3, 2024

Regarding point 3, we have to take care because the language doesn't accept that form.

I think we should keep consistency between the language and the CircuitBuilder.

@rturrado
Copy link
Contributor

rturrado commented Sep 3, 2024

@elenbaasc @juanboschero I think we have to be more specific about this issue. I think the idea would be that, as well as you can use SGMQ (Single Gate Multiple Qubit) notation in the language, you should also be able to use it in the CircuitBuilder. But that doesn't mean that the Measure IR node can have multiple qubits. I think that would complicate the work on the rest of the compiler passes (imagine treating a measure q[1, 3, 5] as a single node instead of as 3 separate nodes, in terms of moving instructions around, dependencies with other instructions and so on...).

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

No branches or pull requests

2 participants