QXel.provider.braket.openqasm._helpers.casting module¶
Utilities for casting and wrapping OpenQASM literal values.
- QXel.provider.braket.openqasm._helpers.casting.cast_to(into, variable)¶
- QXel.provider.braket.openqasm._helpers.casting.cast_to(into, variable)
- QXel.provider.braket.openqasm._helpers.casting.cast_to(into, variable)
- QXel.provider.braket.openqasm._helpers.casting.cast_to(into, variable)
- QXel.provider.braket.openqasm._helpers.casting.cast_to(into, variable)
- QXel.provider.braket.openqasm._helpers.casting.cast_to(into, variable)
- QXel.provider.braket.openqasm._helpers.casting.cast_to(into, variable)
Cast a variable into a given type. Order of parameters is to enable singledispatch
- QXel.provider.braket.openqasm._helpers.casting.is_literal(expression)¶
Return whether an AST expression node is already a literal value.
- QXel.provider.braket.openqasm._helpers.casting.convert_string_to_bool_array(bit_string)¶
Convert BitstringLiteral to Boolean ArrayLiteral
- QXel.provider.braket.openqasm._helpers.casting.convert_bool_array_to_string(bit_string)¶
Convert Boolean ArrayLiteral into a binary string
- QXel.provider.braket.openqasm._helpers.casting.is_none_like(value)¶
Returns whether value is None or an Array of Nones
- QXel.provider.braket.openqasm._helpers.casting.get_identifier_name(identifier)¶
- QXel.provider.braket.openqasm._helpers.casting.get_identifier_name(identifier)
Get name of an identifier
- QXel.provider.braket.openqasm._helpers.casting.wrap_value_into_literal(value)¶
- QXel.provider.braket.openqasm._helpers.casting.wrap_value_into_literal(value)
- QXel.provider.braket.openqasm._helpers.casting.wrap_value_into_literal(value)
- QXel.provider.braket.openqasm._helpers.casting.wrap_value_into_literal(value)
- QXel.provider.braket.openqasm._helpers.casting.wrap_value_into_literal(value)
- QXel.provider.braket.openqasm._helpers.casting.wrap_value_into_literal(value)
- QXel.provider.braket.openqasm._helpers.casting.wrap_value_into_literal(value)
Wrap a primitive variable into an AST node