QuTech-Delft / OpenSquirrel

A flexible (Python-based) quantum program compiler
Apache License 2.0
4 stars 1 forks source link

Allow list in Measure function #210

Open juanboschero opened 3 months ago

juanboschero commented 3 months ago

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