scqubits.core.circuit_utils.get_operator_number#

scqubits.core.circuit_utils.get_operator_number(input_str)[source]#
Returns the number inside an operator name. Example:

$ get_operator_number(“annihilation9_operator”) $ 9

Parameters:

input_str (str) – operator name (one of the methods ending with _operator)

Return type:

int

Returns:

returns the integer as int, else returns None