Skip to content

Commit

Permalink
Add loop ops to Aer BackendV2 test (#9636)
Browse files Browse the repository at this point in the history
789707c (gh-9630) added a test for wrapping Aer in a converted
`BackendV2` subject to providing an extended name mapping for all the
custom instructions that Aer supports, which Terra does not generally
define.  However, the supported lists were based off a slightly older
version of Aer (approximately release version 0.11), and fail on the
current `main` version (due to soon become version 0.12) because of
`break_loop` and `continue_loop` support being added.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 72a7eac)
  • Loading branch information
jakelishman authored and mergify[bot] committed Feb 22, 2023
1 parent fe3cb53 commit 0dc7fc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/python/providers/test_fake_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
from qiskit.quantum_info.operators.channel import SuperOp
from qiskit.extensions import Initialize, UnitaryGate
from qiskit.extensions.quantum_initializer import DiagonalGate, UCGate
from qiskit.circuit.controlflow import IfElseOp, WhileLoopOp, ForLoopOp
from qiskit.circuit.controlflow import IfElseOp, WhileLoopOp, ForLoopOp, ContinueLoopOp, BreakLoopOp

FAKE_PROVIDER_FOR_BACKEND_V2 = FakeProviderForBackendV2()
FAKE_PROVIDER = FakeProvider()
Expand Down Expand Up @@ -425,6 +425,8 @@ def __init__(self, num_ctrl_qubits, ctrl_state=None):
"if_else": IfElseOp,
"while_loop": WhileLoopOp,
"for_loop": ForLoopOp,
"break_loop": BreakLoopOp,
"continue_loop": ContinueLoopOp,
"save_statevector": SaveStatevector,
"mcu": MCUGate,
"set_density_matrix": SetDensityMatrix,
Expand Down

0 comments on commit 0dc7fc1

Please sign in to comment.