Break intermediate measurements on 3+ qubits into single qubit measurements in RouteCQC#6293#6349
Break intermediate measurements on 3+ qubits into single qubit measurements in RouteCQC#6293#6349NoureldinYosri merged 24 commits intomasterfrom unknown repository
RouteCQC#6293#6349Conversation
updat with latest version
Allow specifying settings field from Cirq-ionq (#5817)
Developer enviroment guideline update
updating forked repo
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6349 +/- ##
=======================================
Coverage 97.84% 97.84%
=======================================
Files 1110 1110
Lines 96690 96706 +16
=======================================
+ Hits 94606 94622 +16
Misses 2084 2084 ☔ View full report in Codecov by Sentry. |
on 3+ qubits into single qubit measurements if -and only if- the result isn't stored (i.e. key is None) and test for changes in RoutCQC
RouteCQC#6293
NoureldinYosri
left a comment
There was a problem hiding this comment.
please remove changes to unrelated files
removed unintended change
updates from review- varible names, ciruit build
NoureldinYosri
left a comment
There was a problem hiding this comment.
just a few more nits + please fix the conflict with the main branch
NoureldinYosri
left a comment
There was a problem hiding this comment.
almost there. one small change
| operation = ( | ||
| 'Intermediate measurements on three or more qubits with a custom key' | ||
| ) | ||
| raise ValueError(f'Unsupported operation: {operation}') |
There was a problem hiding this comment.
raise ValueError('Intermediate measurements on three or more qubits with a custom key are not supported')if this line is too long you can break it into two string literals
raise ValueError('Intermediate measurements on three or more qubits '
'with a custom key are not supported')
router mishandling mid-circuit measurements #issue6293
Description of the issue
cirq.RouteCQCcommutes gates in undefined ways due to intermediate measurements with 3 or more qubits not being handled correctly.This PR aims to fix this issue by:
Breaking intermediate measurements on 3+ qubits into single qubit measurements if the result isn't stored (i.e. key is None) else a
ValueErroris raised.Next Steps
Check if it's possible to create a ClassicallyControlledOperation controlled by the result of a multiqubit measurement
From looking at the documentation it seems to be possible. Will stop here until there is a need to support this case.