Skip to content

CI - type check fails for numpy-2.3 #7657

@pavoljuhas

Description

@pavoljuhas

Describe the issue

Recent release of numba-0.62.0 enabled installation of numpy-2.3.3 instead of numpy-2.2.6,
which resulted in failing type check:

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)

Tell us the version of Cirq where this happens

1.7.0.dev at 163a087

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/healthFor CI/testing/release process/refactoring/technical debt items

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions