Expose process-count limits on a per-transpile
basis
#9365
Labels
help wanted
community contributions welcome. For filters like http://github-help-wanted.com/
mod: transpiler
Issues and PRs related to Transpiler
type: feature request
New feature or request
What should we add?
It's currently possible to limit the number of processes used by all calls to
transpile
in a given Python process by the configuration file entrynum_processes
, or by the environment variableQISKIT_NUM_PROCS
, but both of these are only read onimport qiskit
, and affect every call totranspile
.It would be good to expose a
num_processes
kwarg intranspile
, which overrides either of these two options, and can be used to restrict an individual call to certain behaviour. We already have the right kwarg available inparallel.parallel_map
, so exposing this to users should mostly be as straightforward as adding an option totranspile
and propagating it through.We might want to re-arrange the internal logic of
parallel_map
a little so that it's easier to passnum_processes=None
without clobbering its internal default of taking the value from the environment if the option is empty.The text was updated successfully, but these errors were encountered: