Explore possibility of using free-threaded Python

Aperta
#8,342 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@rosspeili ci sta già lavorando.

Dal 19/9/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

area/performance area/python help wanted kind/feature-request no QC knowledge needed skill/expert

Is your feature request related to a use case or problem? Please explain

Python 3.14 provides an option for CPython that enables multiple Python threads to execute bytecode in parallel on multiple CPU cores. The catch is that merely using free-threading does not guarantee a speedup (in fact, single-threaded code may run slower): code needs to be rewritten to take advantage of parallelism. Writing thread-safe code is difficult and will require better ways of testing thread safety.

This issue is about exploring the feasibility, possible benefits, and possible drawbacks of using free-threaded Python interpreters.

Describe the solution you would prefer

  1. Examine if disabling the GIL causes problems for Cirq or its dependent packages
  2. Explore what it would take to rewrite parts of Cirq for multithreaded execution
  3. Make the necessary changes to a small part of Cirq, for testing
  4. Run benchmarks
  5. Summarize the results of 1-4 in a report.

How urgent is this for you? Is it blocking important work?

P3 – I'm not really blocked by it; it's an idea I'm proposing based on principle

Lingua principale
Python
Stelle
5.1k
Fork
1.3k
Merge medio
1g 18h
PR unite (30g)
41

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di quantumlib/Cirq

Tutte le issue di quantumlib/Cirq

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.