dwave.system.samplers.DWaveSampler.validate_anneal_schedule#
- DWaveSampler.validate_anneal_schedule(anneal_schedule)[source]#
Raise an exception if the specified schedule is invalid for the sampler.
- Parameters:
anneal_schedule (list) –
An anneal schedule is defined by a series of pairs of floating-point numbers identifying points in the schedule at which to change slope. The first element in the pair is time, \(t\) in microseconds; the second, normalized anneal fraction (persistent current) \(s\) in the range [0,1]. The resulting schedule is the piecewise-linear curve that connects the provided points.
An anneal schedule must satisfy the conditions described in the anneal_schedule section.
- Raises:
ValueError – If the schedule violates any of the conditions described in the anneal_schedule section.
RuntimeError – If the sampler does not accept the
anneal_schedule
parameter or if it does not have annealing_time_range or max_anneal_schedule_points properties.
Examples
This example sets a quench schedule on a D-Wave quantum computer.
>>> from dwave.system import DWaveSampler >>> with DWaveSampler() as sampler: ... quench_schedule=[[0.0, 0.0], [12.0, 0.6], [12.8, 1.0]] ... DWaveSampler().validate_anneal_schedule(quench_schedule)