Combining readout circuits for QWC pauli strings in the measure_pauli_strings method#7416
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7416 +/- ##
==========================================
- Coverage 98.69% 98.69% -0.01%
==========================================
Files 1112 1112
Lines 97966 97993 +27
==========================================
+ Hits 96688 96714 +26
- Misses 1278 1279 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
eliottrosenberg
left a comment
There was a problem hiding this comment.
Works great! Thanks, @ddddddanni! Tested in this colab.
Thank you!! I will wait for Nour to give a stamp and submit this |
NoureldinYosri
left a comment
There was a problem hiding this comment.
thanks @ddddddanni , overall looks good, just a couple of nits + coverage
| qubits_to_error: SingleQubitReadoutCalibrationResult, readout_qubits: list[ops.Qid] | ||
| ) -> SingleQubitReadoutCalibrationResult: | ||
| """Builds a calibration result for the specific readout qubits.""" | ||
| return SingleQubitReadoutCalibrationResult( |
There was a problem hiding this comment.
nit: this should be a SingleQubitReadoutCalibrationResult method
class SingleQubitReadoutCalibrationResult:
...
def readout_result_for_qubits(self, qubits) -> 'SingleQubitReadoutCalibrationResult':
...There was a problem hiding this comment.
Sure! Moved the method to under SingleQubitReadoutCalibrationResult
|
|
||
| def _extract_readout_qubits(pauli_strings: list[ops.PauliString]) -> list[ops.Qid]: | ||
| """Extracts unique qubits from a list of QWC Pauli strings.""" | ||
| qubits = set() |
There was a problem hiding this comment.
nit:
| qubits = set() | |
| return sorted(set(q for ps in pauli_strings for q in op.qubits)) |
…uli_strings``` method (quantumlib#7416) [PR quantumlib#7236](quantumlib#7236) adds the feature to measure groups of qubit-wise-commuting Pauli operators simultaneously. However, the current implementation generates a separate readout circuit for each individual Pauli operator within a group. This leads to non-simultaneous measurements, which is corrected in this PR.
…uli_strings``` method (quantumlib#7416) [PR quantumlib#7236](quantumlib#7236) adds the feature to measure groups of qubit-wise-commuting Pauli operators simultaneously. However, the current implementation generates a separate readout circuit for each individual Pauli operator within a group. This leads to non-simultaneous measurements, which is corrected in this PR.
PR #7236 adds the feature to measure groups of qubit-wise-commuting Pauli operators simultaneously.
However, the current implementation generates a separate readout circuit for each individual Pauli operator within a group. This leads to non-simultaneous measurements, which is corrected in this PR.