in src/braket/pennylane_plugin/translation.py [0:0]
def supported_operations(device: Device) -> FrozenSet[str]:
"""Returns the operations supported by the plugin based upon the device.
Args:
device (Device): The device to obtain the supported operations for
Returns:
FrozenSet[str]: The names of the supported operations
"""
try:
properties = device.properties.action["braket.ir.jaqcd.program"]
except AttributeError:
raise AttributeError("Device needs to have properties defined.")
supported_ops = frozenset(op.lower() for op in properties.supportedOperations)
return frozenset(
_BRAKET_TO_PENNYLANE_OPERATIONS[op]
for op in _BRAKET_TO_PENNYLANE_OPERATIONS
if op.lower() in supported_ops
)