Skip to content

Commit

Permalink
merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
doichanj committed Aug 9, 2024
2 parents 9d5c4b7 + ad7b86f commit 9bd9d6a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions qiskit_aer/backends/aer_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def _inline_initialize(self, circ, optype):
if isinstance(optype, set) and Initialize not in optype:
return circ

for inst, _, _ in circ.data:
for datum in circ.data:
inst = datum.operation
if isinstance(inst, Initialize) and (
(not isinstance(inst.params[0], complex)) or (len(inst.params) == 1)
):
Expand All @@ -132,7 +133,8 @@ def _inline_initialize(self, circ, optype):

new_circ = circ.copy()
new_circ.data = []
for inst, qargs, cargs in circ.data:
for datum in circ.data:
inst, qargs, cargs = datum.operation, datum.qubits, datum.clbits
if isinstance(inst, Initialize) and (
(not isinstance(inst.params[0], complex)) or (len(inst.params) == 1)
):
Expand Down
3 changes: 2 additions & 1 deletion qiskit_aer/backends/aerbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,8 @@ def _assemble_noise_model(self, circuits, optypes, **run_options):
):
updated_circ = False
new_data = []
for inst, qargs, cargs in circ.data:
for datum in circ.data:
inst, qargs, cargs = datum.operation, datum.qubits, datum.clbits
if isinstance(inst, QuantumChannelInstruction):
updated_circ = True
if not updated_noise:
Expand Down
1 change: 1 addition & 0 deletions test/terra/backends/test_parameterized_qobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

from test.terra import common

import qiskit
from qiskit.compiler import assemble, transpile
from qiskit.circuit import QuantumCircuit, Parameter
from test.terra.reference.ref_save_expval import (
Expand Down
1 change: 1 addition & 0 deletions test/terra/backends/test_runtime_parameterization.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from test.terra import common

import qiskit
from qiskit.compiler import assemble, transpile
from qiskit.circuit import QuantumCircuit, Parameter
from test.terra.reference.ref_save_expval import (
Expand Down

0 comments on commit 9bd9d6a

Please sign in to comment.