qbraid.transpiler.requires_extras

requires_extras(dependency)[source]

Decorator factory to mark conversion functions that require additional dependencies beyond their “{source}_to_{target}” naming convention. It adds a specified dependency as an attribute to the function.

Parameters:

dependency (str) – The name of the required additional dependency.

Returns:

A decorator that marks a function with the required dependency.

Return type:

Callable