You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Method that lists program types that you can pass to QuantumDevice.run #61
Add method to qbraid.runtime.QuantumDevice that returns a list program type aliases that correspond to the registered program types that can be passed to as "run_input" to that device's .run() method.
For example, for the qbraid_qir_simulator, it could look something like:
fromqbraidimportQbraidProviderprovider=QbraidProvider()
device=provider.get_device("qbraid_qir_simulator")
graph=device.scheme.conversion_graphifdevice._target_specisNone:
raiseValueError("Device does not have a target spec.")
target_alias=device._target_spec.aliassupported_run_inputs= []
forprogram_typeingraph.nodes():
ifgraph.has_path(program_type, target_alias):
supported_run_inputs.append(program_type)
print(supported_run_inputs)
However, we want a generic method that will return such a list for any instance of qbraid.runtime.QuantumDevice.
Activity