- Runnable.run(state, **kwargs)[source]¶
Execute the next step/iteration of an instantiated
Accepts a state in a
Future-like object and returns a new state in a
These two code snippets run one iteration of a sampler to produce a new state. The first is an asynchronous call and the second a blocking call.
>>> sampler.run(State.from_sample(min_sample(bqm), bqm)) <Future at 0x20cbe22ea20 state=running>
>>> sampler.run(State.from_sample(min_sample(bqm), bqm), ... executor=hybrid.immediate_executor) <Present at 0x20ca68cd2b0 state=finished returned State>