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

cphase comparison with CZ failing after dependency update #6663

Closed NoureldinYosri closed 2 months ago

NoureldinYosri commented 2 months ago

Description of the issue test following test case started failing at HEAD when run with the latest dependency versions

https://github.com/quantumlib/Cirq/blob/32d48331fecd5f075c25e8f05c4551380bcd6c45/cirq-core/cirq/ops/common_gates_test.py#L902-L904

I temporarly added annotated it with xfail until we fix it.

dstrain115 commented 2 months ago

cirq cync: Comparison sympy.pi now no longer equals math.pi. Solution is unclear.
We could add a float() conversion, but this seems to defeat the purpose of the test. (Possible solution: check equality against sympy.pi)