qiboteam / qibojit

Accelerating Qibo simulation with just-in-time compilation.
https://qibo.science
Apache License 2.0
15 stars 3 forks source link

Support Python 3.12 #170

Closed alecandido closed 7 months ago

alecandido commented 9 months ago

Unfortunately work-in-progress

alecandido commented 9 months ago

Unfortunately, there is an almost circular dependency with qibo: it is qibojit that depends on qibo, that's why I'm trying to upgrade qibo first. However, qibo depends on qibojit for the tests, that's why I mistakenly started from here (i.e. I tried first with qibo and it complained about qibojit, but I didn't investigate enough about why...)

natestemen commented 9 months ago

We're trying to support python 3.12 over on mitiq which has recently added Qibo as a dependency. I took a shot at supporting python 3.12 in Qibo and ran into the circular dependency issue as well. I'm not familiar enough with the project infrastructure to fully understand why, but let me know if there are any smaller things I can look into to help move this along!

alecandido commented 9 months ago

Sorry: I just interrupted because of other priorities. I thought no one needed py3.12 yet.

I believe I could make it by today (if not before). It's non-trivial, but still relatively simple.

alecandido commented 9 months ago

The related PR in Qibo https://github.com/qiboteam/qibo/pull/1231

codecov[bot] commented 9 months ago

Codecov Report

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

Project coverage is 100.00%. Comparing base (8eed737) to head (415d90c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #170 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 12 12 Lines 1085 1085 ========================================= Hits 1085 1085 ``` | [Flag](https://app.codecov.io/gh/qiboteam/qibojit/pull/170/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/qiboteam/qibojit/pull/170/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | `100.00% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#carryforward-flags-in-the-pull-request-comment) to find out more.

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

alecandido commented 8 months ago

@BrunoLiegiBastonLiegi @renatomello: apparently, there are issues linting the quantum_info module (here and not in Qibo...) https://github.com/qiboteam/qibojit/actions/runs/8241315355/job/22538457740#step:10:1785 (among the others, of course they are not related to those purely coming from the Numba/CuPy backends)

BrunoLiegiBastonLiegi commented 8 months ago

@BrunoLiegiBastonLiegi @renatomello: apparently, there are issues linting the quantum_info module (here and not in Qibo...) https://github.com/qiboteam/qibojit/actions/runs/8241315355/job/22538457740#step:10:1785 (among the others, of course they are not related to those purely coming from the Numba/CuPy backends)

weird, may be some problem with the lock?

alecandido commented 8 months ago

weird, may be some problem with the lock?

The lock has no problem on its own, but you could inspect the locked Numba version. https://github.com/qiboteam/qibojit/blob/8cfaea4ae63aa3cbf9aa9bd52d446f8dd48e23bc/poetry.lock#L486-L491

alecandido commented 7 months ago

Just waiting for https://github.com/qiboteam/qibo/pull/1231 to be merged

alecandido commented 7 months ago

@BrunoLiegiBastonLiegi @renatomello now that https://github.com/qiboteam/qibo/pull/1231 has been merged, we should be ready to merge this as well

alecandido commented 7 months ago

Just a note on the numba and pylint version, the earliest version we support is changing because python-3.12 does not support older versions?

Exactly :)

(Though it is better said the other way round: older versions are not supporting py3.12, because of the dependency arrow)

alecandido commented 7 months ago

Thanks! @stavros11 @BrunoLiegiBastonLiegi

alecandido commented 7 months ago

@natestemen now both Qibo and Qibojit are supporting py3.12 in main. Almost for sure, we'll get another release in less than one month.