8000 Improve performance for MacOS users · Issue #494 · tqec/tqec · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Improve performance for MacOS users #494
Open
@nelimee

Description

@nelimee

Describe the bug

It seems like MacOS users are experiencing poor performances when building circuits with TQEC. It would be nice to be able to measure that objectively.

Steps to reproduce the behavior

With main.py being

from tqec import Basis, NoiseModel, compile_block_graph
from tqec.gallery.cnot import cnot

block_graph = cnot(Basis.Z)
correlation_surfaces = block_graph.find_correlation_surfaces()

compiled_computation = compile_block_graph(
    block_graph, observables=[correlation_surfaces[1]]
)

circuit = compiled_computation.generate_stim_circuit(
    k=2,
    noise_model=NoiseModel.uniform_depolarizing(0.001),
)

do the following

python -m pip install tqec[bench]
python -m pyinstrument -o benchmark.html -r html main.py

trying to reduce as much as possible the parallel load on your computer (if possible, close all other applications, do nothing on your computer during the benchmark, ...).

Then, share the following information:

  • the benchmark.html file that has been generated (I have vague memories of GitHub not accepting such files as attachments, if that is still the case I'll open a discussion on the Google group),
  • as many details about your computer as you can (OS, processor, amount of RAM, Python version, output of python -m pip freeze, ...).

For laptop users only:

  • first, do the benchmark with your regular setup (i.e., without touching anything related to power),
  • if you have the time to do so, it would also be interesting to re-do the benchmark with your laptop plugged-in and in charge mode,
  • if you have even more time and willingness it would be interesting to try to disable power sav 654D ing options and re-do the benchmark.

For reference, on my computer:

  • python main.py takes ~14.5s,
  • python -m pyinstrument -o benchmark.html -r html main.py takes ~22.5s.

Metadata

Metadata

Assignees

Labels

backendIssue pertaining to the Python backend (tqec package)bugSomething isn't workingenhancementNew feature or request, may not be in the task flow

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0