-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Combine Pauli measurements and postselection #7492
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
together. | ||
postselection_symmetries: A dictionary mapping Pauli strings or Pauli sums to | ||
expected values for postselection symmetries. The | ||
circuit is the eigenvector of each Pauli string or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> "The final state generated by the circuit is an eigenvector ... with the specified eigenvalues."
|
||
circuit: circuits.FrozenCircuit | ||
pauli_strings: list[ops.PauliString] | list[list[ops.PauliString]] | ||
postselection_symmetries: dict[ops.PauliString | ops.PauliSum, int] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should default to None?
|
||
circuit: circuits.FrozenCircuit | ||
pauli_strings: list[ops.PauliString] | list[list[ops.PauliString]] | ||
postselection_symmetries: dict[ops.PauliString | ops.PauliSum, int] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized that if I try to construct a dictionary with PauliSum
s as keys, I get the error TypeError: unhashable type: 'PauliSum'
. Do you have any suggestions of what to do here? Should we use tuples or make a new data structure?
I actually have
Maybe I can add:
|
sampler: work.Sampler, | ||
circuits_to_pauli_params: list[CircuitToPauliStringsParameters], | ||
pauli_measurement_circuits: list[circuits.Circuit], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this input given that we have circuits_to_pauli_params
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the user doesn't use this function directly, so it's ok
@ddddddanni ah, I missed that I can do |
No description provided.