dwave.system.utilities.energy_scales_custom_schedule#
- energy_scales_custom_schedule(default_schedule: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | list[list[float]] | None = None, s: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | list[float] | None = None, A: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | list[float] | None = None, B: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | list[float] | None = None, c: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | list[float] | None = None, custom_schedule: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | list[list[float]] | None = None, custom_t: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | list[float] | None = None, custom_s: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | 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 .. used in dwave-optimization, 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
, andc
.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 .. used in dwave-optimization. If set
anneal_schedule
must beNone
and values must be provided forA
,B
, andc
.A – Transverse or tunneling energy, \(A(s)\), as a 1-dimensional array-like .. used in dwave-optimization. If set
anneal_schedule
must beNone
and values must be provided fors
,B
, andc
.B – Energy applied to the problem Hamiltonian, \(B(s)\), as a 1-dimensional array-like .. used in dwave-optimization. If set
anneal_schedule
must beNone
and values must be provided fors
,A
, andc
.c – Normalized annealing bias, \(c(s)\), as a 1-dimensional array-like .. used in dwave-optimization. If set
anneal_schedule
must beNone
and values must be provided fors
,A
, andB
.custom_schedule – Your custom anneal schedule, as a 2-column array-like .. used in dwave-optimization, 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
orcustom_s
.custom_t – Time, \(t\), as a 1-dimensional array-like .. used in dwave-optimization, compliant with the rules described for the anneal_schedule parameter. If set
anneal_schedule
must beNone
andcustom_s
must be provided too.custom_s – Normalized anneal fraction, \(\frac{t}{t_a}\), as a 1-dimensional array-like .. used in dwave-optimization, compliant with the rules described for the anneal_schedule parameter.. If set
anneal_schedule
must beNone
andcustom_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)