Explore the use of Numba

Open
#8,343 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@venkatayaswanth-IIITan is already working on this.

Since Oct 7, 2026.

  • #8411 by @Nikhil0188 — closed without merging

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
performance

Research direction

No files, tests, or specific optimization target are named; begin by looking for a Cirq workload where Numba might help. Compare before-and-after benchmarks and report the results, but an open linked pull request indicates work is already underway.

Written by the indexing model from the issue text.

Description

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

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

Numba is an open source, NumPy-aware JIT optimizing compiler for Python. It uses the LLVM compiler project to generate machine code from Python syntax. Numba can compile a large subset of numerically-focused Python, including many NumPy functions. Additionally, Numba has support for automatic parallelization of loops, generation of GPU-accelerated code, and creation of ufuncs and C callbacks.

Describe the solution you would prefer

Numba claims "You don't need to replace the Python interpreter, run a separate compilation step, or even have a C/C++ compiler installed. Just apply one of the Numba decorators to your Python function, and Numba does the rest." (from https://numba.pydata.org/). So one approach to testing its use is:

  1. Find a case where Numba could potentially be used to speed up some aspect of Cirq
  2. Test its use and run before-and-after benchmarks
  3. Report the results

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

Dominant language
Python
Stars
5.1k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
48

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quantumlib/Cirq

All issues in quantumlib/Cirq

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.