transpiler_dispatcher
¶
DeviceConversionPathNotFoundError
¶
Error raised when no conversion path is found for the device.
DeviceNotSpecifiedError
¶
Error raised when a device library is specified but no device is specified.
ProgramConversionPathNotFoundError
¶
Error raised when no conversion path is found for the program.
ProgramLibResolutionError
¶
Error raised when program library cannot be resolved.
ProgramNotSpecifiedError
¶
Error raised when no program is specified.
TranspilerDispatcher
¶
TranspilerDispatcher(transpiler_manager: TranspilerManager, program_converter_manager: ProgramConverterManager, device_converter_manager: DeviceConverterManager, program_type_manager: ProgramTypeManager, device_type_manager: DeviceTypeManager)
A dispatcher class that executes quantum circuit transpilation.
Manages the integrated handling of circuit conversion between different quantum computing libraries and the utilization of various transpiler libraries.
Supports conversion through Qiskit as an intermediate format when direct conversion between programs is not available.
Parameters:
-
transpiler_manager(TranspilerManager) –Manages the selection and execution of transpilers.
-
program_converter_manager(ProgramConverterManager) –Handles conversion of quantum programs between different libraries.
-
device_converter_manager(DeviceConverterManager) –Handles conversion of device specifications between different libraries.
-
program_type_manager(ProgramTypeManager) –Manages detection of program types and their corresponding libraries.
-
device_type_manager(DeviceTypeManager) –Manages detection of device types and their corresponding libraries.
dispatch
¶
dispatch(program: Any, program_lib: str | None, transpiler_lib: str | None, transpiler_options: dict[str, Any] | None, device: Any | None, device_lib: str | None) -> TranspileResult
Execute transpilation of a quantum circuit.
Parameters:
-
program(Any) –The quantum circuit to be transpiled
-
program_lib(str) –Name of the library for the input circuit (e.g., "qiskit")
-
transpiler_lib(str | None) –Name of the transpiler library to use
-
transpiler_options(dict | None) –Options to be passed to the transpiler
-
device(Any | None) –Target device (optional)
-
device_lib(str | None) –Name of the device library (optional)
Returns:
-
TranspileResult(TranspileResult) –Object containing the transpilation results
Raises:
-
ProgramNotSpecifiedError–Raised when no program is specified.
TranspilerDispatcherError
¶
Base class for errors related to the transpiler dispatcher.
TranspilerLibNotSpecifiedError
¶
Error raised when no transpiler library is specified.