dwave.system.utilities.energy_scales_custom_schedule#

energy_scales_custom_schedule(default_schedule: ArrayLike | list[list[float]] | None = None, s: ArrayLike | list[float] | None = None, A: ArrayLike | list[float] | None = None, B: ArrayLike | list[float] | None = None, c: ArrayLike | list[float] | None = None, custom_schedule: ArrayLike | list[list[float]] | None = None, custom_t: ArrayLike | list[float] | None = None, custom_s: ArrayLike | list[float] | None = None) ndarray[source]#

Generates the energy scales for a custom anneal schedule.

The standard annealing trajectory, published for each quantum computer on this page, lowers \(A(s)\), the tunneling energy, and raises \(B(s)\), the problem energy, according to a default schedule. You can customize that schedule as described in the Varying the Global Anneal Schedule section of the Annealing Implementation and Controls page.

This function accepts a quantum computer’s default anneal schedule and your custom schedule (as defined by the anneal_schedule parameter), and returns the energy scales as a function of time.

Parameters:
  • default_schedule – Anneal schedule, as a 4-column array-like, with column values for \(s, A, B, c\) as provided by (and typically taken from) the spreadsheet columns of the published Per-QPU Solver Properties and Schedules page. If set, do not set parameters s, A, B, and c.

  • s – Normalized anneal fraction, \(\frac{t}{t_a}\), which ranges from 0 to 1, where \(t_a\) is the annealing duration, as a 1-dimensional array-like. If set anneal_schedule must be None and values must be provided for A, B, and c.

  • A – Transverse or tunneling energy, \(A(s)\), as a 1-dimensional array-like. If set anneal_schedule must be None and values must be provided for s, B, and c.

  • B – Energy applied to the problem Hamiltonian, \(B(s)\), as a 1-dimensional array-like. If set anneal_schedule must be None and values must be provided for s, A, and c.

  • c – Normalized control bias, \(c(s)\), as a 1-dimensional array-like. If set anneal_schedule must be None and values must be provided for s, A, and B.

  • custom_schedule – Your custom anneal schedule, as a 2-column array-like, with column values for time, \(t\), and the normalized anneal fraction, \(s\). Must meet the rules described for the anneal_schedule parameter. If set, do not set parameters custom_t or custom_s.

  • custom_t – Time, \(t\), as a 1-dimensional array-like, compliant with the rules described for the anneal_schedule parameter. If set anneal_schedule must be None and custom_s must be provided too.

  • custom_s – Normalized anneal fraction, \(\frac{t}{t_a}\), as a 1-dimensional array-like, compliant with the rules described for the anneal_schedule parameter.. If set anneal_schedule must be None and custom_t must be provided too.

Returns:

Energy scales \(A(s), B(s)\), and \(c(s)\), as a NumPy array with columns \(t, s, A, B, c\).

Note

You can prepare the input schedule by downloading the schedule for your selected quantum computer on the Per-QPU Solver Properties and Schedules page, saving the schedule tab in CSV format, and using NumPy’s loadtxt() function, as here:

>>> import numpy as np
>>> schedule = np.loadtxt(schedule_csv_filename, delimiter=",", skiprows=1)

Examples

For a default schedule provided as array schedule_qpu3, this example returns the energy scales for a reverse anneal.

>>> from dwave.system import energy_scales_custom_schedule
...
>>> anneal_schedule = [[0.0, 1.0], [5, 0.45], [99, 0.45], [100, 1.0]]
>>> energy_schedule = energy_scales_custom_schedule(
...     schedule_qpu3,
...     custom_schedule=anneal_schedule)