amazon-braket / BraketSimulator.jl

Apache License 2.0
10 stars 4 forks source link

fix: Set max parallel to 32 or nthreads, whichever is smaller #31

Closed kshyatt-aws closed 3 months ago

kshyatt-aws commented 3 months ago

Issue #, if available: N/A

Description of changes: Cap the number of parallel tasks to whichever of 32 and the thread count is smaller, to avoid spawning too many tasks

Testing done: Unit tests passed. Ran a batch of 30 16-qubit circuits locally in 1.03s.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.