qbraid.programs.get_program_type_alias

get_program_type_alias(program, safe=False)[source]

Get the type alias of a quantum program from registry.

Parameters:
  • program (qbraid.programs.QPROGRAM) – The quantum program to get the type of.

  • safe (bool) – If True, return None if the program type does not match any registered program types. Defaults to False.

Returns:

The type of the quantum program. None: If the program type does not match any registered program types and safe is True.

Return type:

str

Raises:

ProgramTypeError – If the program type does not match any registered program types.