Closed NoureldinYosri closed 4 months ago
@pavoljuhas when I use ops.CZ
I get
cirq-core/cirq/transformers/gauge_compiling/sqrt_cz_gauge.py:28: error: Cannot determine type of "CZ" [has-type]
@pavoljuhas when I use
ops.CZ
I getcirq-core/cirq/transformers/gauge_compiling/sqrt_cz_gauge.py:28: error: Cannot determine type of "CZ" [has-type]
This seems to happen because check/mypy cirq-core
follows the import cirq
loading order and that line is reached before the cirq.ops
package is fully loaded. If gauge_compiling
is not imported from transformers.__init__
the typecheck seems to pass.
Do we need to import gauge_compiling
by default at import cirq
or can it be an optional thing requiring import cirq.transformer.gauge_compiling
to access?
If optional, we may save ourselves some headaches with circular imports or strange typechecking errors down the line.
Codecov Report
Attention: Patch coverage is
97.87234%
with1 lines
in your changes are missing coverage. Please review.Additional details and impacted files
```diff @@ Coverage Diff @@ ## main #6571 +/- ## ========================================== - Coverage 97.79% 97.78% -0.01% ========================================== Files 1124 1124 Lines 95659 95699 +40 ========================================== + Hits 93550 93580 +30 - Misses 2109 2119 +10 ```:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.