Skip to content

Commit

Permalink
Document new env variable in Qiskit 1.2.0 (#1836)
Browse files Browse the repository at this point in the history
In Qiskit 1.2.0 a new env variable was added to control the threading
behavior of the routing and layout passes in the preset pass managers.
You can see the details of this new option in the 1.2.0 release notes or
in the PR Qiskit/qiskit#12780. This commit adds the documentation for
this feature to the local configuration guide.

---------

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Co-authored-by: abbycross <across@us.ibm.com>
  • Loading branch information
3 people authored Aug 16, 2024
1 parent b0b6452 commit 24f844d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/guides/configure-qiskit-local.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Set these environment variables to alter the default behavior of Qiskit:
- `QISKIT_NUM_PROCS`: The maximum number of parallel processes to launch for parallel operations if parallel execution is enabled. Specify an integer greater than zero.
- `RAYON_NUM_THREADS`: The number of threads to run multithreaded operations in Qiskit. By default, multithreaded code launches a thread for each logical CPU. To adjust the number of threads Qiskit uses, set this to an integer value. For example, setting RAYON_NUM_THREADS=4 launches four threads for multithreaded functions.
- `QISKIT_FORCE_THREADS`: Specifies that multithreaded code should always execute in multiple threads. By default, if you're running multithreaded code in a section of Qiskit that is already running in parallel processes, Qiskit does not launch multiple threads but instead executes that function serially. This is done to avoid potentially overloading limited CPU resources. However, if you want to force the use of multiple threads even when in a multiprocess context, set `QISKIT_FORCE_THREADS=TRUE`.
- `QISKIT_SABRE_ALL_THREADS`: Controls the behavior of the layout and routing pass in Qiskit's preset pass manager. When set to `1` or `TRUE`, this uses all available CPUs for running multiple random trials. This can improve the quality of the results, especially for systems with greater than 20 CPUs/cores; the tradeoff, however, is that results are not reproducible when run on different local hardware.

## Next steps

Expand Down

0 comments on commit 24f844d

Please sign in to comment.