Skip to content

Instantly share code, notes, and snippets.

@SaraM92
Created February 27, 2023 07:53
Show Gist options
  • Save SaraM92/90c63e02d3bed578d40ae3cab8d4749c to your computer and use it in GitHub Desktop.
Save SaraM92/90c63e02d3bed578d40ae3cab8d4749c to your computer and use it in GitHub Desktop.
# print all (the usual suspects) available gates currently available within SDK
gate_set = [attr for attr in dir(Gate) if attr[0] in string.ascii_uppercase]
print('Gate set supported by SDK:\n', gate_set)
print('\n')
# the Rigetti device
device = AwsDevice('arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-2')
supported_gates = device.properties.action['braket.ir.jaqcd.program'].supportedOperations
# print the supported gate set
print('Gate set supported by the Rigetti device:\n', supported_gates)
print('\n')
# the IonQ device
device = AwsDevice("arn:aws:braket:::device/qpu/ionq/ionQdevice")
supported_gates = device.properties.action['braket.ir.jaqcd.program'].supportedOperations
# print the supported gate set
print('Gate set supported by the IonQ device:\n', supported_gates)
print('\n')
# the Oxford Quantum Circuits (OQC) device
device = AwsDevice("arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy")
supported_gates = device.properties.action['braket.ir.jaqcd.program'].supportedOperations
# print the supported gate set
print('Gate set supported by the OQC device:\n', supported_gates)
#the quEra device
device = AwsDevice('arn:aws:braket:us-east-1::device/qpu/quera/Aquila')
supported_gates = device.properties.action['braket.ir.jaqcd.program'].supportedOperations
# print the supported gate set
print('Gate set supported by the quEra device:\n', supported_gates)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment