-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Create a new implementation of parallel XEB and its methods #6940
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6940 +/- ##
========================================
Coverage 98.66% 98.67%
========================================
Files 1106 1109 +3
Lines 96448 96826 +378
========================================
+ Hits 95165 95542 +377
- Misses 1283 1284 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pool: Optional['multiprocessing.pool.Pool'] = None, | ||
batch_size: int = 9, | ||
tags: Sequence[Any] = (), | ||
entangling_circuit_or_op: Optional[Union['cirq.AbstractCircuit', 'cirq.Operation']] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, in order to do parallel XEB, we will want to be able to input something like a set of circuits (that each act on two qubits) or a dictionary from pairs to circuits because, for example, we may have different z-phase corrections on different pairs of qubits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reimplemented parallel XEB to support this use case. ptal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Nour! I will take a look soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried using it and got an error (colab). Also, maybe we can call the folder benchmarking
instead of error_mitigation
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it again inputting a dictionary and am still getting an error when I do result.pauli_error()
(colab)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please fix type annotations for the new return value.
* update parallel XEB methods to support circuits instead of single gates * map qubits * nit * type * validate input * nit * nit * Reimplement parallel XEB and restore old files * nit * add __init__.py * format * fix issues * fix indexing issue * fix pair dropping issue * remove debug statements * checkpoint * add docstring and tests * fix mypy * coverage * coverage * coverage * address comments * format * change fidelity estimator from probability ratio model to cross entropy model * make test robust to noise * nit * Fix spelling typos * Address type check * Use unquoted type annotations in new source files * address comments * fix mypy --------- Co-authored-by: Michael Hucka <[email protected]> Co-authored-by: Pavol Juhas <[email protected]>
…ib#6940) * update parallel XEB methods to support circuits instead of single gates * map qubits * nit * type * validate input * nit * nit * Reimplement parallel XEB and restore old files * nit * add __init__.py * format * fix issues * fix indexing issue * fix pair dropping issue * remove debug statements * checkpoint * add docstring and tests * fix mypy * coverage * coverage * coverage * address comments * format * change fidelity estimator from probability ratio model to cross entropy model * make test robust to noise * nit * Fix spelling typos * Address type check * Use unquoted type annotations in new source files * address comments * fix mypy * set seed in all tests --------- Co-authored-by: Michael Hucka <[email protected]> Co-authored-by: Pavol Juhas <[email protected]>
This is a new implemenation of parallel XEB that doesn't rely on legacy code. This module reimplements almost all of the what is needed to run parallel XEB. The reason for a completly new implementation is that the old implementation (also written by me) relied on old code that don't support the new use case of running XEB on circuits that depenend on the qubit pair and the effort needed to update the old code is more than the effort needed to write a new implementation.