Skip to content

Commit

Permalink
Merge branch 'Qiskit:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanro authored Jan 26, 2025
2 parents 6c9525b + 1e86d65 commit 9855e6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion qiskit_aer/library/control_flow_instructions/jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class AerJump(Instruction):
def __init__(self, jump_to, num_qubits, num_clbits=0):
super().__init__("jump", num_qubits, num_clbits, [jump_to])
self.condition_expr = None
self.condition = None

def set_conditional(self, cond):
"""Set condition to perform this jump instruction.
Expand All @@ -42,5 +43,5 @@ def set_conditional(self, cond):
if isinstance(cond, Expr):
self.condition_expr = cond
else:
self.c_if(*cond)
self.condition = cond
return self
5 changes: 3 additions & 2 deletions qiskit_aer/noise/errors/quantum_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,9 @@ def to_dict(self):
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
condition = getattr(inst.operation, "condition", None)
if condition:
inst_dict["condition"] = condition
circ_inst.append(inst_dict)
instructions.append(circ_inst)
# Construct error dict
Expand Down

0 comments on commit 9855e6b

Please sign in to comment.