Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
May 17, 2021

Conversation

mergify[bot]
Copy link
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 <[email protected]>
Co-authored-by: Manoel Marques <[email protected]>
(cherry picked from commit 9d4bb91)

# Conflicts:
#	qiskit/utils/run_circuits.py
#	test/python/algorithms/test_backendv1.py
@mergify mergify bot requested review from manoelmarques, woodsp-ibm and a team 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: Bugfix Include in the "Fixed" section of the 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: Bugfix Include in the "Fixed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants