Cirq icon indicating copy to clipboard operation
Cirq copied to clipboard

Combine Pauli measurements and postselection

Open ddddddanni opened this issue 5 months ago • 5 comments

ddddddanni avatar Jul 15 '25 04:07 ddddddanni

Thanks, Danni! This is a really great start! In addition to the comments below, it would be great if we could return the fraction of the bitstrings that survive the postselection, and maybe even more granular information in addition, like how many violate each of the symmetries. Maybe we can also optionally return the raw bitstrings to the users in case they want to do more analysis on them.

I actually have

@attrs.frozen
class PostFilteringSymmetryCalibrationResult:
    """Result of post-selection symmetry calibration.
    Attributes:
        raw_bitstrings: The raw bitstrings obtained from the measurement.
        filtered_bitstrings: The bitstrings after applying post-selection symmetries.
    """

    raw_bitstrings: np.ndarray
    filtered_bitstrings: np.ndarray

Maybe I can add:

  1. fraction_of_survived_bistrings: float
  2. symmetry_to_filtered_bistrings: dict{paulistring|paulisum, list[bitstrings]}?

ddddddanni avatar Jul 15 '25 22:07 ddddddanni

@ddddddanni ah, I missed that I can do .calibration_result.filtered_bitstrings and .calibration_result.calibration_result.filtered_bitstrings. That's great! Thanks!

eliottrosenberg avatar Jul 15 '25 22:07 eliottrosenberg

@ddddddanni Just wanted to gently ask what the status of this is. No pressure; I know this is a draft.

mhucka avatar Oct 13 '25 23:10 mhucka

@ddddddanni Just wanted to gently ask what the status of this is. No pressure; I know this is a draft.

Thanks for checking!! I was working on the other PRs and Q3 okrs. I plan to get back to this PR this week.

ddddddanni avatar Oct 14 '25 01:10 ddddddanni

@ddddddanni No problem at all. Thanks for your quick reply!

mhucka avatar Oct 14 '25 04:10 mhucka