quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.24k stars 1.01k forks source link

Mark ProjectorSum class as unhashable #6701

Closed pavoljuhas closed 1 month ago

pavoljuhas commented 1 month ago

ProjectorSum stores data in a mutable LinearDict which is not hashable. LinearDict also does not pickle, because by default it has a lambda-function attribute.

This excludes ProjectorSum from the test_hash_from_pickle test.

Resolves #6674

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.83%. Comparing base (5377fff) to head (00d4344).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6701 +/- ## ======================================= Coverage 97.82% 97.83% ======================================= Files 1075 1075 Lines 92325 92325 ======================================= + Hits 90320 90324 +4 + Misses 2005 2001 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.