Skip to content

Commit

Permalink
Add open_pulse entry to AerBackendConfiguration (#2214)
Browse files Browse the repository at this point in the history
* add open_pulse entry to AerBackendConfiguration

* add test
  • Loading branch information
t-imamichi authored Aug 30, 2024
1 parent 11a89c4 commit b306b83
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions qiskit_aer/backends/backendconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ def __init__(
self.local = True
self.simulator = True
self.conditional = True
self.open_pulse = False
self.memory = True
self.max_shots = max_shots
self.coupling_map = coupling_map
Expand Down
42 changes: 42 additions & 0 deletions test/terra/backends/test_assemble.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2024.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.
"""
Tests for assemble with Aer simulators
"""

from test.terra.common import QiskitAerTestCase

from ddt import data, ddt
from qiskit import QuantumCircuit, assemble

from qiskit_aer.backends import AerSimulator, QasmSimulator, StatevectorSimulator, UnitarySimulator


@ddt
class TestAssemble(QiskitAerTestCase):
"""Tests for assemble with Aer simulators."""

@data("aer", "statevector", "qasm", "unitary")
def test_assemble(self, simulator: str):
"""Test for assemble"""
if simulator == "aer":
backend = AerSimulator()
elif simulator == "statevector":
backend = StatevectorSimulator()
elif simulator == "qasm":
backend = QasmSimulator()
elif simulator == "unitary":
backend = UnitarySimulator()

qc = QuantumCircuit(1, 1)
qobj = assemble(qc, backend=backend)
self.assertIsNotNone(qobj)

0 comments on commit b306b83

Please sign in to comment.