autoqasm.operators.return_statements module
Operations to override return statement behavior.
- autoqasm.operators.return_statements.return_output_from_main(name: str, value: Any) Any[source]
Registers an output variable in the program with the given name that matches the type of the value. The value is assigned to the output variable.
- Parameters:
name (str) – The symbol name for the return variable.
value (Any) – The value of the returned variable.
- Returns:
Any – Returns the same value that is being returned in the statement.