amazon-braket / amazon-braket-ocean-plugin-python

A Python plugin for using Ocean with Amazon Braket
https://amazon-braket-ocean-plugin-python.readthedocs.io/
Apache License 2.0
20 stars 11 forks source link

Cannot use sample_qubo of BraketSampler with postprocessingType parameter #62

Closed AoyuQC closed 2 years ago

AoyuQC commented 2 years ago

Describe the bug Cannot use the example from tutorial to test the sample_qubo function of BraketSampler

To reproduce from braket.ocean_plugin import BraketSampler

sampler = BraketSampler(s3_folder, "arn:aws:braket:::device/qpu/d-wave/Advantage_system4")

Q = {(0, 0): -1, (4, 4): -1, (0, 4): 2}

sampleset = sampler.sample_qubo(Q, postprocessingType="SAMPLING", shots=100)

Expected behavior Run without errors

Screenshots or logs Screen Shot 2021-11-29 at 3 19 20 PM

System information

A description of your system. Please provide:

Additional context Add any other context about the problem here.

math411 commented 2 years ago

Hello,

Thank you for reaching out! For this issue and https://github.com/aws/amazon-braket-ocean-plugin-python/issues/63, a fix will be coming out shortly.

In this particular case, the device specific properties for arn:aws:braket:::device/qpu/d-wave/Advantage_system4 can be found here. The other D-Wave device, arn:aws:braket:::device/qpu/d-wave/DW_2000Q_6, has device properties defined in a schema here.

Feel free to respond with any further questions.

math411 commented 2 years ago

A fix went out in https://github.com/aws/amazon-braket-ocean-plugin-python/pull/64 for this issue.