You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would argue that this is not really necessary and introduces unneeded complications. The MeasurementResult, indeed, appears to be using the .measurement_gate just to retrieve the qubits (.measurement_gate.target_qubits). For this reason, I would propose to remove this dependence and, for instance, build a MeasurementResult object just starting from the measured qubit indices, rather than the whole measurement gate (as discussed in #1431 already).
The text was updated successfully, but these errors were encountered:
build a MeasurementResult object just starting from the measured qubit indices, rather than the whole measurement gate
In principle, you could even avoid storing indices in there, since they are already in the gate (it would be redundant information).
For methods that require that (which actually only require the number of measured qubits) you could even get it as an argument, or, even better, infer from the shots shape (since they are the results for a single gate, and the number of qubits to which the gate is applied should match one of the dimensions of the shots shape).
Currently the gate
M
and theMeasurementResult
object cyclically depend on each other:qibo/src/qibo/gates/measurements.py
Line 59 in f20f433
qibo/src/qibo/measurements.py
Line 83 in f20f433
I would argue that this is not really necessary and introduces unneeded complications. The
MeasurementResult
, indeed, appears to be using the.measurement_gate
just to retrieve the qubits (.measurement_gate.target_qubits
). For this reason, I would propose to remove this dependence and, for instance, build aMeasurementResult
object just starting from the measured qubit indices, rather than the whole measurement gate (as discussed in #1431 already).The text was updated successfully, but these errors were encountered: