-
-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor classical postprocessing in shadows module (#2152)
* remove unused helper functions * simplify product calculation * remove unnecessary type ignore comment * avoid using private _unitary_ method * import numpy typing library as a whole this is consistent with how we do it in other parts of the codebase * remove unused `fidelity` function * add more extensive tests * refactor/simplify `get_single_shot_pauli_fidelity` * simplify expected result/assertion testing * refactor `get_pauli_fidelities` * simplify variable names in `shadow_state_reconstruction` * distinct variable names * remove boolean calibration flag use optional fidelities instead * simplify tests; use `np.testing` functions for assertions * better variable naming in `classical_snapshot` * refactor `expectation_estimation_shadow` * remove calibration option from docs; add fidelity back * fix precedence * remove `print` statements * compute batch sizes properly; move `-1` into sum i misunderstood how `np.array_split` worked. it uses the number of splits, as opposed to the size of each batch. (-1)^x + (-1)^y =/= (-1)^(x + y) * remove `use_calibration` option in docs * add tests for added util functions
- Loading branch information
1 parent
68af75d
commit 81b3f78
Showing
9 changed files
with
359 additions
and
519 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.