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

FPR Bugfixes and Feature Enhancements #261

Merged
merged 33 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0f2c098
Merge branch 'develop' of https://github.com/pyGSTio/pyGSTi into develop
Sep 23, 2021
2895481
First pass at reworker per-germ-L fpr (not working still).
sserita Jan 21, 2022
a4447b7
Merge branch 'develop' into bugfix-fpr-pgl-params
Feb 16, 2022
0df3a1d
Updates EigenvalueParamDenseOp so that n x n degenerate blocks are pa…
Feb 17, 2022
a00b1b8
Updates the per-germ-per-L FPR algorithm to test eigenvalue magnitude…
Feb 17, 2022
95a7b13
Updates unit tests to match updated germ selection routine.
Feb 17, 2022
7016a05
Updates a system test for recent per-germ-per-L FPR changes.
Feb 18, 2022
9dfccb7
Merge branch 'develop' into bugfix-fpr-pgl-params
Mar 2, 2022
30f7fc8
Merge branch 'develop' into bugfix-fpr-pgl-params
Mar 11, 2022
bc32079
Updated the per-germ power fpr algorithm to use relative tolerances b…
Mar 29, 2022
65ae161
Merge branch 'bugfix-fpr-pgl-params' of https://github.com/pyGSTio/py…
Mar 29, 2022
a33c187
Bugfix for the fisher information by L calculation which adds in the …
Apr 5, 2022
666b78c
Simple fix for logic on when to add in the additional circuits.
Apr 5, 2022
a8c0ab3
Refinements to the per-germ FPR algorithm that add the ability to sea…
Apr 12, 2022
ff9f2fc
Compatibility fixes for per-germ power FPR. More updates needed to br…
Apr 12, 2022
c8e9862
Edge cases when there are collisions between eigenvalues
Aug 25, 2022
2a582e5
Revert "Edge cases when there are collisions between eigenvalues"
Aug 25, 2022
a0a1b83
Edge cases when there are collisions between eigenvalues
Aug 25, 2022
d0bd0d3
Fix parameter counting for minimum number of fiducial pairs needed.
Aug 29, 2022
cda8c52
Update per-germ FPR docstring
Aug 30, 2022
5753273
Remove condition number thresholding
Aug 30, 2022
deb8a27
Minor Typo Fix
Aug 30, 2022
dad9205
Merge branch 'develop' into bugfix-fpr-pgl-params
coreyostrove Aug 30, 2022
dd8fe0b
Minor Typo Fix
Aug 30, 2022
053c3de
Unit test fixes
Sep 1, 2022
6c9d757
More unit test fixes
Sep 1, 2022
a077146
Yet more unit test updates
Sep 1, 2022
26e2bb6
Changes to logging
Sep 1, 2022
fdb5ce9
Unit test updates
Sep 1, 2022
1c4aba7
Logging fix
Sep 1, 2022
3bf5e48
Move rank test earlier
Sep 1, 2022
758d444
Update kwargs in FPR tutorial notebook
Sep 6, 2022
1654a70
Try to patch the FPR unit tests on windows
Sep 6, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
"\n",
"where $F_i$ is a \"preparation fiducial\" sequence, $F_j$ is a \"measurement fiducial\" sequence, and \"g_k\" is a \"germ\" sequence. The repeated germ sequence $(g_k)^n$ we refer to as a \"germ-power\". There are currently three different ways to reduce a standard set of GST operation sequences within pyGSTi, each of which removes certain $(F_i,F_j)$ fiducial pairs for certain germ-powers.\n",
"\n",
"- **Global fiducial pair reduction (GFPR)** removes the same intelligently-selected set of fiducial pairs for all germ-powers. This is a conceptually simple method of reducing the operation sequences, but it is the most computationally intensive since it repeatedly evaluates the number of amplified parameters for en *entire germ set*. In practice, while it can give very large sequence reductions, its long run can make it prohibitive, and the \"per-germ\" reduction discussed next is used instead.\n",
"- **Global fiducial pair reduction (GFPR)** removes the same intelligently-selected set of fiducial pairs for all germ-powers. This is a conceptually simple method of reducing the operation sequences, but it is the most computationally intensive since it repeatedly evaluates the number of amplified parameters for en *entire germ set*. In practice, while it can give very large sequence reductions, its long run can make it prohibitive, and the \"per-germ\" reduction discussed next is used instead. \n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just bookmarking for us, but we may want to deprecate/underemphasize global FPR... It's slow and not any better than per-germ.

"<span style=\"color:red\">Note: this form of FPR is deprecated on the latest versions of pygsti's develop branch. We now recommend using per-germ FPR instead. Also note that the current implementation of per-germ FPR will in most cases return smaller experiment designs than the legacy global FPR does.</span>\n",
"\n",
"- **Per-germ fiducial pair reduction (PFPR)** removes the same intelligently-selected set of fiducial pairs for all powers of a given germ, but different sets are removed for different germs. Since different germs amplify different directions in model space, it makes intuitive sense to specify different fiducial pair sets for different germs. Because this method only considers one germ at a time, it is less computationally intensive than GFPR, and thus more practical. Note, however, that PFPR usually results in less of a reduction of the operation sequences, since it does not (currently) take advantage overlaps in the amplified directions of different germs (i.e. if $g_1$ and $g_3$ both amplify two of the same directions, then GST doesn't need to know about these from both germs).\n",
"- **Random fiducial pair reduction (RFPR)** randomly chooses a different set of fiducial pairs to remove for each germ-power. It is extremly fast to perform, as pairs are just randomly selected for removal, and in practice works well (i.e. does not impair Heisenberg-scaling) up until some critical fraction of the pairs are removed. This reflects the fact that the direction detected by a fiducial pairs usually has some non-negligible overlap with each of the directions amplified by a germ, and it is the exceptional case that an amplified direction escapes undetected. As such, the \"critical fraction\" which can usually be safely removed equals the ratio of amplified-parameters to germ-process-matrix-elements (typically $\\approx 1/d^2$ where $d$ is the Hilbert space dimension, so $1/4 = 25\\%$ for 1 qubit and $1/16 = 6.25\\%$ for 2 qubits). RFPR can be combined with GFPR or PFPR so that some number of randomly chosen pairs can be added on top of the \"intelligently-chosen\" pairs of GFPR or PFPR. In this way, one can vary the amount of sequence reduction (in order to trade off speed vs. robustness to non-Markovian noise) without inadvertently selecting too few or an especially bad set of random fiducial pairs.\n",
"- **Random per-germ power fiducial pair reduction (RFPR)** randomly chooses a different set of fiducial pairs to remove for each germ-power. It is extremly fast to perform, as pairs are just randomly selected for removal, and in practice works well (i.e. does not impair Heisenberg-scaling) up until some critical fraction of the pairs are removed. This reflects the fact that the direction detected by a fiducial pairs usually has some non-negligible overlap with each of the directions amplified by a germ, and it is the exceptional case that an amplified direction escapes undetected. As such, the \"critical fraction\" which can usually be safely removed equals the ratio of amplified-parameters to germ-process-matrix-elements (typically $\\approx 1/d^2$ where $d$ is the Hilbert space dimension, so $1/4 = 25\\%$ for 1 qubit and $1/16 = 6.25\\%$ for 2 qubits). RFPR can be combined with GFPR or PFPR so that some number of randomly chosen pairs can be added on top of the \"intelligently-chosen\" pairs of GFPR or PFPR. In this way, one can vary the amount of sequence reduction (in order to trade off speed vs. robustness to non-Markovian noise) without inadvertently selecting too few or an especially bad set of random fiducial pairs.\n",
"\n",
"## Preliminaries\n",
"\n",
Expand Down Expand Up @@ -129,7 +131,11 @@
"fid_pairsDict = pygsti.alg.find_sufficient_fiducial_pairs_per_germ(\n",
" target_model, prep_fiducials, meas_fiducials, germs,\n",
" search_mode=\"random\", constrain_to_tp=True,\n",
" n_random=100, seed=1234, verbosity=1,\n",
" n_random=100, min_iterations=50,\n",
" base_loweig_tol= .25, num_soln_returned=1,\n",
" type_soln_returned= 'best',\n",
" retry_for_smaller=True,\n",
" seed=1234, verbosity=1,\n",
" mem_limit=int(2*(1024)**3))\n",
"print(\"\\nPer-germ FPR to keep the pairs:\")\n",
"for germ,pairsToKeep in fid_pairsDict.items():\n",
Expand Down
Loading