dwave.system.temperatures.background_susceptibility_bqm#

background_susceptibility_bqm(bqm: BinaryQuadraticModel, chi: float | None = None)[source]#

Create the binary quadratic model for the background susceptibility correction.

Background susceptibility can be treated as a perturbative correction to the programmed Hamiltonian:

\[bqm = bqm \textrm{(no background susceptibility)} + \chi \times dbqm \textrm{(corrections)}\]
Parameters:
  • bqm – A dimod binary quadratic model (BQM) describing the programmed Hamiltonian.

  • chi – Scale of background susceptibility correction, \(\chi\). If chi is None, \(dbqm\) is returned; otherwise the perturbed Hamiltonian is returned.

Returns:

The given BQM with values corrected for the given background susceptibility.

Return type:

BinaryQuadraticModel

Examples

This example calculates the background-susceptibility corrections, shown symbolically in the Background Susceptibility section, for a three-qubit BQM with the following values:

  • Biases \(h_1=0.3, h_2=0.8, h_3=-0.25\)

  • Couplings \(J_{1,2}=1.2, J_{2,3}=-0.4\)

  • \(\chi=-0.01\)

>>> import dimod
>>> from dwave.system.temperatures import background_susceptibility_bqm
...
>>> h1 = 0.3; h2 = 0.8; h3 = -0.25
>>> J12 = 1.2; J23 = -0.4
>>> chi = -0.01
>>> bqm = dimod.BQM.from_ising(
...     {'1': h1, '2': h2, '3': h3},
...     {('1', '2'): J12, ('2', '3'): J23})
>>> bqm_chi = background_susceptibility_bqm(bqm, chi)
>>> print(round(bqm_chi.linear['1'], 2))
0.29

The formula shown in the Background Susceptibility section for qubit 1, is \(h_1 + h_2 \chi J_{1,2}\); using the values of this example gives \(h_1 + h_2 \chi J_{1,2} = 0.3 + 0.8*(-0.01)*1.2 = 0.2904\).