Explore the use of Mypyc

Open
#8,344 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@challavidya-04 is already working on this.

Since Sep 27, 2026.

Assessment

This issue has not been assessed yet.

Description

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

Mypyc compiles Python modules to C extensions. It uses standard Python type hints to generate fast code. Mypyc uses mypy to perform type checking and type inference. Most type system features in the stdlib typing module are supported. Existing code with type annotations is often 1.5x to 5x faster when compiled. Code tuned for mypyc can be 5x to 10x faster.

Describe the solution you would prefer

  1. Figure out how to make use of mypyc
  2. Implement a limited use of mypyc
  3. Test before-and-after results on Cirq benchmarks
  4. 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.