-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area/dependenciesarea/mypyarea/numpykind/bug-reportSomething doesn't seem to work.Something doesn't seem to work.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on
Description
Describe the issue
When uploading the PR #7655, I found this failure that is irrelevant to my change.
cirq-core/cirq/transformers/heuristic_decompositions/two_qubit_gate_tabulation.py:112: error: Need type annotation for "inner_gates" [var-annotated]
cirq-core/cirq/linalg/transformations.py:85: error: Argument "key" to "max" has incompatible type "Callable[[tuple[Any, ...]], ndarray[tuple[Any, ...], dtype[floating[Any]]]]"; expected "Callable[[tuple[Any, ...]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]
cirq-core/cirq/linalg/transformations.py:85: error: Incompatible return value type (got "ndarray[tuple[Any, ...], dtype[floating[Any]]]", expected "SupportsDunderLT[Any] | SupportsDunderGT[Any]") [return-value]
cirq-core/cirq/ops/clifford_gate.py:642: error: Argument "key" to "max" has incompatible type "Callable[[tuple[Any, ...]], ndarray[tuple[Any, ...], dtype[floating[Any]]]]"; expected "Callable[[tuple[Any, ...]], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]
cirq-core/cirq/ops/clifford_gate.py:642: error: Incompatible return value type (got "ndarray[tuple[Any, ...], dtype[floating[Any]]]", expected "SupportsDunderLT[Any] | SupportsDunderGT[Any]") [return-value]
cirq-core/cirq/sim/clifford/stabilizer_state_ch_form.py:291: error: Unused "type: ignore" comment [unused-ignore]
cirq-core/cirq/sim/clifford/stabilizer_state_ch_form.py:292: error: Unused "type: ignore" comment [unused-ignore]
cirq-core/cirq/sim/clifford/stabilizer_state_ch_form.py:293: error: Unused "type: ignore" comment [unused-ignore]
cirq-core/cirq/sim/clifford/stabilizer_state_ch_form.py:294: error: Unused "type: ignore" comment [unused-ignore]
cirq-core/cirq/sim/state_vector_simulation_state_test.py:120: error: Argument "dtype" to "StateVectorSimulationState" has incompatible type "dtype[Any]"; expected "type[complexfloating[Any, Any]]" [arg-type]
cirq-core/cirq/sim/state_vector_simulation_state_test.py:139: error: Argument "dtype" to "StateVectorSimulationState" has incompatible type "dtype[Any]"; expected "type[complexfloating[Any, Any]]" [arg-type]
Found 11 errors in 5 files (checked 1126 source files)
This failure can be reproduced locally as well, and I don't see any recent changes on the failing files, CI configuration etc.
One thing to note is that the type check only fails in the latest CI run on my PR, it's PASS in the previous round:
- FAIL: https://github.com/quantumlib/Cirq/actions/runs/17844613705/job/50741471717
- PASS: https://github.com/quantumlib/Cirq/actions/runs/17834763837/job/50709006575
The difference between the two commit is just the commit message.
Explain how to reproduce the bug or problem
It is failing on CI, and also locally:
./check/mypy
Put long logs in HTML details blocks like this.
Tell us the version of Cirq where this happens
From latest source code
python -c 'import cirq; print(cirq.__version__)'
1.6.1
Metadata
Metadata
Assignees
Labels
area/dependenciesarea/mypyarea/numpykind/bug-reportSomething doesn't seem to work.Something doesn't seem to work.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked onA consensus emerged that this bug report, feature request, or other action should be worked on