Skip to content

Conversation

@95-martin-orion
Copy link
Collaborator

Fixes #565.

cirq.PauliString does not include identities in its .items() representation. Changing this is difficult due to how Cirq handles Paulis; instead, it is simpler to treat empty PauliStrings as identities in qsim.

@95-martin-orion
Copy link
Collaborator Author

The reason we haven't seen this before is that identities were not supported in cirq.PauliString until recently: quantumlib/Cirq#5621

Copy link
Collaborator

@sergeisakov sergeisakov left a comment

Choose a reason for hiding this comment

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

LGTM

@95-martin-orion 95-martin-orion merged commit a12801e into master Sep 27, 2022
@95-martin-orion 95-martin-orion deleted the id-evs branch September 27, 2022 21:10
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.

QSimSimulator.simulate_expectation_values for identity operators is wrong

2 participants