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

Fisher Information for Instruments #503

Merged
merged 2 commits into from
Nov 5, 2024
Merged

Conversation

coreyostrove
Copy link
Contributor

TLDR: This PR updates the implementation of the fisher information for experiment designs to support models/circuits with quantum instruments. This was requested ages ago in #464.

As part of updating the fisher information related code to support instruments this PR also changes the way that we do regularization. Previously this regularization was managed by adding a small amount of depolarizing error to the SPAM operations. Following a recommendation from @robinbk this has been changed to instead perform regularization by setting a minimum value for the probability p_min such that any probability below this threshold is clipped to this minimum value. As such, while in my testing the results looked nearly identical to previously calculated fisher information matrices for known experiment designs, the new code won't exactly reproduce the results of the older implementation.

Corey Ostrove added 2 commits October 22, 2024 23:30
Updates the implementation of the fisher information calculation to support instruments. In addition to this there is a rework to the way that models are regularized to remove the use of depolarization and instead add in a minimum probability used for clipping small values. This was done in part to avoid the need to add in extra handling for regularizing instruments. Seems to still give sensible results for models with known fisher info spectra.

Also patches back in support for the 'cumulative' kwarg when computing fisher information by L (I could've sworn we had this implemented, but maybe it got lost at some point?).
Add unit tests for instrument fisher information and modify existing unit tests. It looks like the change in the regularization likely adds some additional numerical gunk to the accumulation process which was resulting in small, but nonzero differences in the FIM matrices depending on if they were accumulated all at once, or length by length. Or at least that is my best guess for what is going on, hopefully that isn't incorrect.
@coreyostrove coreyostrove requested review from rileyjmurray and a team as code owners October 25, 2024 03:29
@coreyostrove coreyostrove requested a review from sserita October 25, 2024 03:29
@coreyostrove coreyostrove self-assigned this Oct 25, 2024
@coreyostrove coreyostrove added this to the 0.9.13 milestone Oct 25, 2024
Copy link
Contributor

@sserita sserita left a comment

Choose a reason for hiding this comment

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

No changes needed, thanks for these updates. Also nice catch on the cumulative flag not being used properly...

@sserita sserita merged commit 916877c into develop Nov 5, 2024
4 checks passed
@sserita sserita deleted the feature-fisher-info-instruments branch November 5, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants