diff --git a/qiskit_aer/library/save_instructions/save_data.py b/qiskit_aer/library/save_instructions/save_data.py index 7a1b6b77b9..136d17a993 100644 --- a/qiskit_aer/library/save_instructions/save_data.py +++ b/qiskit_aer/library/save_instructions/save_data.py @@ -58,15 +58,6 @@ def __init__(self, name, num_qubits, label, subtype="single", params=None): self._label = label self._subtype = subtype - def assemble(self): - """Return the QasmQobjInstruction for the intructions.""" - instr = super().assemble() - # Use same fields as Snapshot instruction - # so we dont need to modify QasmQobjInstruction - instr.snapshot_type = self._subtype - instr.label = self._label - return instr - def inverse(self, annotated=False): """Special case. Return self.""" return copy.copy(self) diff --git a/qiskit_aer/noise/errors/quantum_error.py b/qiskit_aer/noise/errors/quantum_error.py index 9d3d72e1fb..fac98c0bd7 100644 --- a/qiskit_aer/noise/errors/quantum_error.py +++ b/qiskit_aer/noise/errors/quantum_error.py @@ -312,9 +312,16 @@ def to_dict(self): for circ in self._circs: circ_inst = [] for inst in circ.data: - qobj_inst = inst.operation.assemble() - qobj_inst.qubits = [circ.find_bit(q).index for q in inst.qubits] - circ_inst.append(qobj_inst.to_dict()) + inst_dict = {} + inst_dict["name"] = inst.operation.name + inst_dict["qubits"] = [circ.find_bit(q).index for q in inst.qubits] + if inst.operation.params: + inst_dict["params"] = inst.operation.params + if inst.operation.label: + inst_dict["label"] = inst.operation.label + if inst.operation.condition: + inst_dict["condition"] = inst.operation.condition + circ_inst.append(inst_dict) instructions.append(circ_inst) # Construct error dict error = { diff --git a/test/terra/backends/simulator_test_case.py b/test/terra/backends/simulator_test_case.py index c075ff0140..f83a5b2aef 100644 --- a/test/terra/backends/simulator_test_case.py +++ b/test/terra/backends/simulator_test_case.py @@ -19,8 +19,6 @@ from qiskit_aer import AerSimulator from test.terra.common import QiskitAerTestCase from qiskit.circuit import QuantumCircuit -from qiskit.compiler import assemble - class SimulatorTestCase(QiskitAerTestCase): """Simulator test class""" diff --git a/test/terra/backends/test_parameterized_circuit.py b/test/terra/backends/test_parameterized_circuit.py index 9a9290f202..d087ef79ac 100644 --- a/test/terra/backends/test_parameterized_circuit.py +++ b/test/terra/backends/test_parameterized_circuit.py @@ -20,7 +20,7 @@ from test.terra import common -from qiskit.compiler import assemble, transpile +from qiskit.compiler import transpile from qiskit.circuit import QuantumCircuit, Parameter from test.terra.reference.ref_save_expval import ( save_expval_circuits, diff --git a/test/terra/backends/test_runtime_parameterization.py b/test/terra/backends/test_runtime_parameterization.py index 3a0ba3da3c..e1940fe727 100644 --- a/test/terra/backends/test_runtime_parameterization.py +++ b/test/terra/backends/test_runtime_parameterization.py @@ -22,7 +22,7 @@ from test.terra import common -from qiskit.compiler import assemble, transpile +from qiskit.compiler import transpile from qiskit.circuit import QuantumCircuit, Parameter from test.terra.reference.ref_save_expval import ( save_expval_circuits, diff --git a/tools/verify_wheels.py b/tools/verify_wheels.py index 7a1004b8bb..8b66788f5b 100644 --- a/tools/verify_wheels.py +++ b/tools/verify_wheels.py @@ -8,7 +8,7 @@ import numpy as np from qiskit import ClassicalRegister -from qiskit.compiler import assemble, transpile +from qiskit.compiler import transpile from qiskit import QuantumCircuit from qiskit import QuantumRegister from qiskit.quantum_info import Operator, Statevector