autoqasm.constants module

Constants used in the output conversion of AutoQASM programs. When we output programs to to OpenQASM, we must declare variables and thus associate them with a string name.

autoqasm.constants.ARRAY_NAME_TEMPLATE = '__arr_{0}__'

String template for auto-generated array names.

autoqasm.constants.BIT_NAME_TEMPLATE = '__bit_{0}__'

String template for auto-generated bit variable names.

autoqasm.constants.BOOL_NAME_TEMPLATE = '__bool_{0}__'

String template for auto-generated boolean variable names.

autoqasm.constants.FLOAT_NAME_TEMPLATE = '__float_{0}__'

String template for auto-generated float names.

autoqasm.constants.INT_NAME_TEMPLATE = '__int_{0}__'

String template for auto-generated integer names.

autoqasm.constants.QUBIT_REGISTER = '__qubits__'

Qubits are globally addressed, and so we can specify a single qubit register name.

autoqasm.constants.RETVAL_VARIABLE_NAME = 'retval_'

A special name for variables assigned to the return values of function calls.

autoqasm.constants.MAIN_RETURN_VAL_NAME = 'return_value'

The default name for the value returned from autoqasm.main functions.