Skip to content

adding use case about Bayesian estimation#471

Open
MichalGQM wants to merge 3 commits intomainfrom
BayesianEstimationUseCase
Open

adding use case about Bayesian estimation#471
MichalGQM wants to merge 3 commits intomainfrom
BayesianEstimationUseCase

Conversation

@MichalGQM
Copy link
Copy Markdown
Contributor

No description provided.

@MichalGQM MichalGQM requested a review from TomDvirQM February 19, 2026 20:13

# Flux shift amplitude conversion (device-specific)
# NOTE: this assumes freq_vs_flux_01_quad_term exists and sign makes the sqrt valid
flux_shift = np.sqrt(-params.physical_detuning / freq_vs_flux_01_quad_term)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should we have the ability to set it to zero if the freq_vs_flux term doesn't exist? what is the the style of the usecase - very specfic to the original implementation or plug and play?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

very specific to the original implementation... then people can modify it. Do you think it's important to add it?

# Bayesian update
assign(rk, Cast.to_fixed(state) - 0.5)
assign(t_sample, Cast.mul_fixed_by_int(1e-3, t * 4)) # tau in us

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would add a comment "Looping over the frequencies and updating the probabilit for each one based on the last measurement result"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

But in this loop we don't use the measurement result... what am I missing?

This use case demonstrates Bayesian estimation of a Ramsey fringe frequency (effective detuning) using single-shot measurements on a flux-tunable transmon controlled by the OPX.

The protocol performs a Ramsey-style experiment and updates a discrete posterior distribution over a frequency grid after each measurement outcome. At the end of each repetition, the posterior mean provides an estimate of the effective detuning.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should add a reference to Fabrizzio's paper, saying that this is based on that. And also, acknowledge the work by Fabrizzion

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure! Can you send me the paper you are referring to?

Copy link
Copy Markdown
Collaborator

@TomDvirQM TomDvirQM left a comment

Choose a reason for hiding this comment

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

Looks great, tiny comment about documentation

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