-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Respect max_experiments in QuantumInstance BackendV1 path (#6391)
* Respect max_experiments in QuantumInstance BackendV1 path In #6299 support was fixed for strict BackendV1 backends that only take QuantumCircuit objects (instead of qobj) for the input. That was fixed by adding a parallel path when running with a new backend. However that parallel path wasn't identical and was missing the support the qobj path had for splitting an algorithm run into multiple jobs if the backend if the number of circuits was greater than the max_experiments set in the backend. This would result on some providers' backends, such as ionq and aqt, both of which have max_experiments set to 1. This commit fixes this issue by splitting the circuits list into smaller sublists when the len(circuits) > max_experiments (or the old env var, which we should change the name of at some point). * Fix issues with results and split circuits path * Fix copy paste issue * Update qiskit/utils/run_circuits.py * Add release notes * Fix whitespace Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com> Co-authored-by: Manoel Marques <Manoel.Marques@ibm.com>
- Loading branch information
1 parent
4004ab9
commit 9d4bb91
Showing
3 changed files
with
131 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
releasenotes/notes/respect-max-experiments-quantum-instance-aae99429034aab52.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed an issue with the :class:`~qiskit.utils.QuantumInstance` with | ||
:class:`~qiskit.providers.BackendV1` backends with the | ||
:attr:`~qiskit.providers.models.BackendConfiguration.`max_experiments` | ||
attribute set to a value less than the number of circuits to run. Previously | ||
the :class:`~qiskit.utils.QuantumInstance` would not correctly split the | ||
circuits to run into separate jobs, which has been corrected. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters