Commit e6de61a0 authored by Omar's avatar Omar
Browse files

Style and comments

* Added explanatory comments
* Pushed f64 to the top of the for loop body
parent e1396c5a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -152,11 +152,13 @@ antlrcpp::Any qasm3_visitor::visitQuantumGateDefinition(
  // from this custom gate definition
  std::vector<mlir::Value> result_qubit_vals;
  for (auto arg : entryBlock.getArguments()) {
    mlir::Value last_user = arg;
    // check if argument is a gate param
    if (arg.getType().isF64()) {
        result_qubit_vals.push_back(arg);
    // skip use chain traversal
        continue;
    }
    mlir::Value last_user = arg;
    auto users = last_user.getUsers();

    while (!users.empty()) {