qbraid.programs

Module containing quantum circuit wrapper classes providing uniform suite of methods and functionality for supported program types.

Data Types

QPROGRAM_REGISTRY = Maps aliases of quantum program types to their respective Python type objects.: dict[str, Type[Any]]

Functions

load_program(program)

Apply qbraid quantum program wrapper to a supported quantum program.

get_program_type_alias(program[, safe])

Get the type alias of a quantum program from registry.

register_program_type(program_type[, alias, ...])

Registers a user-defined program type under the specified alias.

unregister_program_type(alias[, raise_error])

Unregisters the program type associated with the given alias.

Classes

ProgramSpec(program_type[, alias, ...])

Base class used to register program type and type alias.

QuantumProgram(program)

Abstract class for qbraid program wrapper objects.

QbraidMetaType(name, bases, namespace, /, ...)

Abstract metaclass for custom program type checking based on built-in types.

IonQDict()

Marker class for dict that are valid IonQ JSON formatted programs.

Qasm2String()

Marker class for strings that are valid OpenQASM 2 programs.

Qasm3String()

Marker class for strings that are valid OpenQASM 3 programs.

Exceptions

PackageValueError(package)

Class for errors raised due to unsupported quantum frontend package

ProgramTypeError([program, message])

Exception raised for errors encountered with unsupported quantum programs.

ValidationError([program, message])

Custom exception for validation errors in program types.

QasmError

For errors raised while processing OpenQASM programs.

TransformError

Base class for errors raised during qBraid transform processes.

Submodules

ahs

Module containing sub-modules for interfacing with various quantum software libraries and program types.

circuits

Module containing sub-modules for interfacing with various quantum software libraries and program types.