Skip to content

403 Forbidden on certain ising problem submissions #536

@iamashwin99

Description

@iamashwin99

Description
When submitting a simple ising problem such as :

from dwave.system import EmbeddingComposite, DWaveSampler
qpu = DWaveSampler(region='eu-central-1')
q0 = qpu.nodelist[1]
q1 =  next(iter(qpu.adjacency[q0]))
q0, q1  # The two chosen qubits
qpu.sample_ising({}, {(q0, q1): -1}, num_reads=738, annealing_time=1195.4)

on the latest versions of the dwave-system library, I get the following error:

Python 3.8.10 | packaged by conda-forge | (default, Sep 13 2021, 21:46:58) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> from dwave.system import EmbeddingComposite, DWaveSampler

q0 = qpu.nodelist[1]
q1 =  next(iter(qpu.adjacency[q0]))
q0, q1  # The two chosen qubits
qpu.sample_ising({}, {(q0, q1): -1}, num_reads=738, annealing_time=1195.4)
>>> qpu = DWaveSampler(region='eu-central-1')
>>> q0 = qpu.nodelist[1]
>>> q1 =  next(iter(qpu.adjacency[q0]))
>>> q0, q1  # The two chosen qubits
(31, 32)
>>> qpu.sample_ising({}, {(q0, q1): -1}, num_reads=738, annealing_time=1195.4)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "$ENV_DIR/dtest2/lib/python3.8/site-packages/dimod/sampleset.py", line 1032, in __repr__
    self.record,
  File "$ENV_DIR/dtest2/lib/python3.8/site-packages/dimod/sampleset.py", line 1126, in record
    self.resolve()
  File "$ENV_DIR/dtest2/lib/python3.8/site-packages/dimod/sampleset.py", line 1490, in resolve
    samples = self._result_hook(self._future)
  File "$ENV_DIR/dtest2/lib/python3.8/site-packages/dwave/system/samplers/dwave_sampler.py", line 449, in _hook
    raise exc
  File "$ENV_DIR/dtest2/lib/python3.8/site-packages/dwave/system/samplers/dwave_sampler.py", line 436, in _hook
    return resolve(computation)
  File "$ENV_DIR/dtest2/lib/python3.8/site-packages/dwave/system/samplers/dwave_sampler.py", line 426, in resolve
    sampleset.resolve()
  File "$ENV_DIR/dtest2/lib/python3.8/site-packages/dimod/sampleset.py", line 1490, in resolve
    samples = self._result_hook(self._future)
  File "$ENV_DIR/dtest2/lib/python3.8/site-packages/dwave/cloud/computation.py", line 833, in <lambda>
    sampleset = dimod.SampleSet.from_future(self, lambda f: f.wait_sampleset())
  File "$ENV_DIR/dtest2/lib/python3.8/site-packages/dwave/cloud/computation.py", line 771, in wait_sampleset
    self._load_result()
  File "$ENV_DIR/dtest2/lib/python3.8/site-packages/dwave/cloud/computation.py", line 907, in _load_result
    raise self._exception
  File "$ENV_DIR/dtest2/lib/python3.8/site-packages/dwave/cloud/client/base.py", line 1288, in _do_submit_problems
    message = Client._sapi_request(
  File "$ENV_DIR/dtest2/lib/python3.8/site-packages/dwave/cloud/client/base.py", line 1827, in _sapi_request
    raise SolverError(error_msg=error_msg, error_code=error_code)
dwave.cloud.exceptions.SolverError: <html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
</body>
</html>

Here are the relevant packages in that environment:

$ pip freeze | grep dwave
dwave-cloud-client==0.13.0
dwave-optimization==0.3.0
dwave-preprocessing==0.6.6
dwave-samplers==1.3.0
dwave-system==1.26.0
dwave_networkx==0.8.15

I have tried this with both Python 3.11.10 and Python 3.8.10 and have the same result each time ( not a single successful submission)

On another environment with Python3.8.10 and the following packages:

$ pip freeze | grep dwave
dwave-cloud-client==0.12.0
dwave-greedy==0.3.0
dwave-hybrid==0.6.11
dwave-inspector==0.5.0.post0
dwave-neal==0.6.0
dwave-ocean-sdk==7.0.0
dwave-optimization==0.1.0
dwave-preprocessing==0.6.5
dwave-samplers==1.2.0
dwave-system==1.25.0
dwave-tabu==0.5.0
dwave_networkx==0.8.15
dwavebinarycsp==0.3.0

The same minimal reproducible example always succeeds.
Perhaps there is a bug in the new version of one of these packages?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions