Skip to content

Respect max_experiments in QuantumInstance BackendV1 path (backport #6391)#6414

Merged
1ucian0 merged 3 commits into
stable/0.17from
mergify/bp/stable/0.17/pr-6391
May 17, 2021
Merged

Respect max_experiments in QuantumInstance BackendV1 path (backport #6391)#6414
1ucian0 merged 3 commits into
stable/0.17from
mergify/bp/stable/0.17/pr-6391

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented May 14, 2021

This is an automatic backport of pull request #6391 done by Mergify.
Cherry-pick of 9d4bb91 has failed:

On branch mergify/bp/stable/0.17/pr-6391
Your branch is up to date with 'origin/stable/0.17'.

You are currently cherry-picking commit 9d4bb91b8.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   releasenotes/notes/respect-max-experiments-quantum-instance-aae99429034aab52.yaml

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   qiskit/utils/run_circuits.py
	both modified:   test/python/algorithms/test_backendv1.py

To fix up this pull request, you can check it out locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

* 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>
(cherry picked from commit 9d4bb91)

# Conflicts:
#	qiskit/utils/run_circuits.py
#	test/python/algorithms/test_backendv1.py
@mergify mergify Bot requested review from a team, manoelmarques and woodsp-ibm as code owners May 14, 2021 00:24
@mergify mergify Bot added the conflicts used by mergify when there are conflicts in a port label May 14, 2021
This commit fixes the merge conflicts from backporting #6391 to
stable/0.17. The tests added in #6391 are just removed because they
can't actually run without #6286 which isn't backportable.
@mtreinish mtreinish added Changelog: Fixed Add a "Fixed" entry in the GitHub Release changelog. and removed conflicts used by mergify when there are conflicts in a port labels May 14, 2021
@1ucian0 1ucian0 merged commit 59d4ad9 into stable/0.17 May 17, 2021
@1ucian0 1ucian0 deleted the mergify/bp/stable/0.17/pr-6391 branch May 17, 2021 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: Fixed Add a "Fixed" entry in the GitHub Release changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants