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

transpile a list of circuits with a single element should return a list with a single element #5298

Merged
merged 3 commits into from
Nov 13, 2020

Conversation

1ucian0
Copy link
Member

@1ucian0 1ucian0 commented Oct 27, 2020

Fixes #5260

When transpile is called with a list, it should return a list, independently of the length of the list.

@1ucian0 1ucian0 requested a review from a team as a code owner October 27, 2020 20:44
@kdk kdk added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Nov 12, 2020
@kdk kdk added the automerge label Nov 12, 2020
@mergify mergify bot merged commit 5be00b6 into Qiskit:master Nov 13, 2020
mtreinish pushed a commit to Qiskit/qiskit-aer that referenced this pull request Nov 16, 2020
In Qiskit/qiskit#5298 a bug was fixed to ensure that a singe entry list
passed to `transpile()` would always return a list instead of just a circuit
object. However, in the aer tests there were a couple of places that were
building a list assuming transpile would return a bare circuit object. When
the terra fix merged changing the return type the tests started to fail because
the input to the `assemble()` function was now a list of a list of circuits instead
of the intend list of circuits. This commit fixes this issue so it works with the
corrected terra behavior.
@1ucian0 1ucian0 added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Dec 10, 2020
mergify bot pushed a commit that referenced this pull request Dec 10, 2020
Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com>
(cherry picked from commit 5be00b6)
mergify bot added a commit that referenced this pull request Dec 11, 2020
Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com>
(cherry picked from commit 5be00b6)

Co-authored-by: Luciano Bello <luciano.bello@ibm.com>
chriseclectic pushed a commit to chriseclectic/qiskit-aer that referenced this pull request Dec 11, 2020
In Qiskit/qiskit#5298 a bug was fixed to ensure that a singe entry list
passed to `transpile()` would always return a list instead of just a circuit
object. However, in the aer tests there were a couple of places that were
building a list assuming transpile would return a bare circuit object. When
the terra fix merged changing the return type the tests started to fail because
the input to the `assemble()` function was now a list of a list of circuits instead
of the intend list of circuits. This commit fixes this issue so it works with the
corrected terra behavior.
chriseclectic pushed a commit to chriseclectic/qiskit-aer that referenced this pull request Dec 11, 2020
In Qiskit/qiskit#5298 a bug was fixed to ensure that a singe entry list
passed to `transpile()` would always return a list instead of just a circuit
object. However, in the aer tests there were a couple of places that were
building a list assuming transpile would return a bare circuit object. When
the terra fix merged changing the return type the tests started to fail because
the input to the `assemble()` function was now a list of a list of circuits instead
of the intend list of circuits. This commit fixes this issue so it works with the
corrected terra behavior.
chriseclectic pushed a commit to chriseclectic/qiskit-aer that referenced this pull request Jan 25, 2021
In Qiskit/qiskit#5298 a bug was fixed to ensure that a singe entry list
passed to `transpile()` would always return a list instead of just a circuit
object. However, in the aer tests there were a couple of places that were
building a list assuming transpile would return a bare circuit object. When
the terra fix merged changing the return type the tests started to fail because
the input to the `assemble()` function was now a list of a list of circuits instead
of the intend list of circuits. This commit fixes this issue so it works with the
corrected terra behavior.
chriseclectic pushed a commit to chriseclectic/qiskit-aer that referenced this pull request Jan 25, 2021
In Qiskit/qiskit#5298 a bug was fixed to ensure that a singe entry list
passed to `transpile()` would always return a list instead of just a circuit
object. However, in the aer tests there were a couple of places that were
building a list assuming transpile would return a bare circuit object. When
the terra fix merged changing the return type the tests started to fail because
the input to the `assemble()` function was now a list of a list of circuits instead
of the intend list of circuits. This commit fixes this issue so it works with the
corrected terra behavior.
mtreinish added a commit to mtreinish/qiskit-core that referenced this pull request Apr 4, 2022
This commit fixes the return type when calling schedule() with a list of
a single entry. Previously this would return a single Schedule object
instead of the expected list return. A similar issue was already fixed
in transpile() in Qiskit#5298 but schedule still had the incorrect behavior.
mergify bot added a commit that referenced this pull request Apr 4, 2022
This commit fixes the return type when calling schedule() with a list of
a single entry. Previously this would return a single Schedule object
instead of the expected list return. A similar issue was already fixed
in transpile() in #5298 but schedule still had the incorrect behavior.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot pushed a commit that referenced this pull request Apr 4, 2022
This commit fixes the return type when calling schedule() with a list of
a single entry. Previously this would return a single Schedule object
instead of the expected list return. A similar issue was already fixed
in transpile() in #5298 but schedule still had the incorrect behavior.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 6192bfd)
mergify bot added a commit that referenced this pull request Apr 5, 2022
This commit fixes the return type when calling schedule() with a list of
a single entry. Previously this would return a single Schedule object
instead of the expected list return. A similar issue was already fixed
in transpile() in #5298 but schedule still had the incorrect behavior.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 6192bfd)

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
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 stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

transpile() always returns a circuit not in a list whether or not the input is a circuit in a list
2 participants