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

Small bug I found, in the _order_result #822

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/qililab/platform/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,12 +1060,12 @@ def _order_result(self, result: Result, circuit: Circuit) -> Result:
raise NotImplementedError("Result ordering is only implemented for qblox results")

# register the overall order of all qubit measurements.
qubits_m = {}
order = {}
qubits_m: dict = {}
order: dict = {}
# iterate over qubits measured in same order as they appear in the circuit
for i, qubit in enumerate(qubit for gate in circuit.queue for qubit in gate.qubits if isinstance(gate, M)):
if qubit not in qubits_m:
qubits_m[qubit] = 0
qubits_m |= {qubit: 0}
order[qubit, qubits_m[qubit]] = i
qubits_m[qubit] += 1
if len(order) != len(result.qblox_raw_results):
Expand Down
Loading