Commit f82c7554 authored by Nguyen, Thien Minh's avatar Nguyen, Thien Minh
Browse files

Missing one use-def update in X -> CX ctrl application



Signed-off-by: default avatarThien Nguyen <nguyentm@ornl.gov>
parent 3f27bfb3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -85,6 +85,9 @@ void ModifierBlockInlinerPass::applyControlledQuantumOp(
    mlir::Value new_ctrl_qubit_ssa = new_inst.result().front();
    control_bit.replaceAllUsesExcept(
        new_ctrl_qubit_ssa, mlir::SmallPtrSet<Operation *, 1>{new_inst});
    // Update the target qubit SSA use-def:
    qvsOp.result()[0].replaceAllUsesExcept(
        new_inst.result().back(), mlir::SmallPtrSet<Operation *, 1>{new_inst});
  } else if (inst_name == "y") {
    // cy a,b { sdg b; cx a,b; s b; }
    mlir::Type qubit_type = qvsOp.getOperand(0).getType();