Wait for the solver to receive a response for a submitted problem.

Blocking call that waits for a Future object to complete.

Parameters:timeout (float, optional, default=None) – Maximum number of seconds to await completion. If None, waits indefinitely.
Returns:True if solver received a response.
Return type:Boolean


This example creates a solver using the local system’s default D-Wave Cloud Client configuration file, submits a simple QUBO problem to a remote D-Wave resource for 100 samples, and tries waiting for 10 seconds for sampling to complete.

>>> from dwave.cloud import Client
>>> client = Client.from_config()         # doctest: +SKIP
>>> solver = client.get_solver()          # doctest: +SKIP
>>> u, v = next(iter(solver.edges))       # doctest: +SKIP
>>> Q = {(u, u): -1, (u, v): 0, (v, u): 2, (v, v): -1}  # doctest: +SKIP
>>> computation = solver.sample_qubo(Q, num_reads=100)   # doctest: +SKIP
>>> computation.wait(timeout=10)    # doctest: +SKIP
>>> computation.remote_status        # doctest: +SKIP
>>> computation.wait(timeout=10)    # doctest: +SKIP
>>> computation.remote_status       # doctest: +SKIP
>>> client.close()         # doctest: +SKIP