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
......@@ -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()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment