dwave.system.utilities.anneal_schedule_with_offset#

anneal_schedule_with_offset(anneal_offset: float = 0.0, anneal_schedule: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | list | 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 | None = None, A: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | list | None = None, B: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | list | None = None, c: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | list | None = None) ndarray[source]#

Calculates the anneal schedule for a given anneal offset.

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, identically for all qubits. Anneal offsets enable you to adjust the standard annealing path per qubit.

This function accepts a quantum computer’s anneal schedule and an offset value, and returns the advanced or delayed schedule.

Parameters:
  • anneal_offset – Anneal-offset value for a single qubit.

  • anneal_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, anneal_offset is the only additional parameter allowed.

  • 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 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 .. used in dwave-optimization. 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 .. used in dwave-optimization. If set anneal_schedule must be None and values must be provided for s, A, and c.

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

Returns:

Offset schedules \(A(s), B(s)\), and \(c(s)\), as a NumPy array with columns \(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 schedule provided as array schedule, this example returns the schedule with an offset of 0.2.

>>> from dwave.system import anneal_schedule_with_offset
...
>>> offset = 0.2
>>> schedule_offset = anneal_schedule_with_offset(offset, schedule)