Skip to content
This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Conversation

kdk
Copy link
Member

@kdk kdk commented Aug 8, 2019

qiskit.transpile will attempt to distribute circuits for transpilation across any available cores, generally reducing transpile times, but measuring single threaded performance can provide more reliable insight into how individual commits impact performance and will allow for measuring the benefit of parallel vs serial transpilation.

This PR adds a single-threaded version to the RB benchmark, which currently transpiles in parallel, by hard coding the QISKIT_IN_PARALLEL environment variable.

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea behind this change LGTM, but I'm concerned about the environmental variable use here. Will the variable stick between runs of the benchmark? I think just to be safe we should add a teardown[1] method to both benchmark classes to make sure we unset the env variable (if it's set) after each benchmark execution.

[1] https://asv.readthedocs.io/en/stable/writing_benchmarks.html#setup-and-teardown-functions

@kdk kdk force-pushed the single-thread-transpiler-benchmarks branch from 7d2ddf2 to 5ae9b0f Compare August 9, 2019 16:44
@kdk kdk changed the title Add single-threaded versions of quantum volume and RB benchmarks. Add single-threaded versions of RB benchmarks. Aug 9, 2019
@jaygambetta
Copy link
Member

@mtreinish did you and @kdk close on this.

@mtreinish
Copy link
Member

@jaygambetta @kdk and I were talking about this one the other day. There are some last minute changes he was working on before this is ready.

@jaygambetta jaygambetta merged commit 0dae84e into Qiskit:master Aug 18, 2019
jakelishman pushed a commit to jakelishman/qiskit-terra that referenced this pull request Aug 1, 2023
…kage#396)

* Add single-threaded versions of RB benchmarks.

* Unset QISKIT_IN_PARALLEL env variable after RB benchmarks.
jakelishman pushed a commit to jakelishman/qiskit-terra that referenced this pull request Aug 11, 2023
…kage#396)

* Add single-threaded versions of RB benchmarks.

* Unset QISKIT_IN_PARALLEL env variable after RB benchmarks.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants