-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
RustThis PR or issue is related to Rust code in the repositoryThis PR or issue is related to Rust code in the repositorymod: transpilerIssues and PRs related to TranspilerIssues and PRs related to Transpiler
Description
Based on @eliarbel's comment in #15039 :
I was also thinking about the following while going over the code:
The flow of the checking logic insideinstruction_supportedcould probably be refactored to something along the lines of:
- If
namenot in in_gate_name_map- return false- If non-global instructions and mismatched
qargs- return false- If parameters don't match - return false
- Return true
This seems like a more natural flow that will simplify the code a bit, including I think eliminating one of the qargs checks for the
TargetOperation::Variadiccase.
Originally posted by @eliarbel in #15039 (review)
Metadata
Metadata
Assignees
Labels
RustThis PR or issue is related to Rust code in the repositoryThis PR or issue is related to Rust code in the repositorymod: transpilerIssues and PRs related to TranspilerIssues and PRs related to Transpiler