dwave-system icon indicating copy to clipboard operation
dwave-system copied to clipboard

Temperature feature

Open jackraymond opened this issue 3 years ago • 6 comments

Routines are provided to efficiently establish the temperature of a Classical Boltzmann sampler from a set of samples for an arbitary Hamiltonian. This can be used to provide an estimate to the QPU 'effective temperature' (T), where it is assumed the QPU returns Boltzmann samples P(x) = exp(-H(x)/T)/Z where H(x) is the problem Hamiltonian and Z is the partition function. This is a common support question. Uses of the QPU as a Boltzmann sampler include machine learning applications.

jackraymond avatar Dec 20 '21 19:12 jackraymond

Codecov Report

Merging #436 (cbd9958) into master (97ac44f) will decrease coverage by 5.07%. The diff coverage is 80.95%.

@@            Coverage Diff             @@
##           master     #436      +/-   ##
==========================================
- Coverage   91.05%   85.97%   -5.08%     
==========================================
  Files          23       24       +1     
  Lines        1543     1669     +126     
==========================================
+ Hits         1405     1435      +30     
- Misses        138      234      +96     
Impacted Files Coverage Δ
dwave/system/temperatures.py 80.64% <80.64%> (ø)
dwave/system/__init__.py 100.00% <100.00%> (ø)
dwave/system/coupling_groups.py 12.50% <0.00%> (-81.25%) :arrow_down:
dwave/system/samplers/leap_hybrid_sampler.py 61.42% <0.00%> (-14.29%) :arrow_down:
dwave/system/samplers/clique.py 73.85% <0.00%> (-13.73%) :arrow_down:
dwave/system/samplers/dwave_sampler.py 82.03% <0.00%> (-3.00%) :arrow_down:
dwave/system/composites/embedding.py 96.57% <0.00%> (-1.15%) :arrow_down:
dwave/system/testing.py 95.23% <0.00%> (-0.80%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Dec 20 '21 19:12 codecov-commenter

You'll need to also add this to the docs, and resolve any doctest failures. I think the simplest would be to edit https://github.com/dwavesystems/dwave-system/blob/master/docs/reference/utilities.rst to something like

.. _utilities_system:

=========
Utilities
=========

Graph Utilities
--------------

.. automodule:: dwave.system.utilities

.. currentmodule:: dwave.system.utilities

.. autosummary::
   :toctree: generated/

   common_working_graph


Temperature Utilities
---------------------

.. automodule:: dwave.system.temperatures

.. currentmodule:: dwave.system.temperatures

.. autosummary::
   :toctree: generated/

   effective_field
   maximum_pseudolikelihood_temperature
   freezeout_effective_temperature
   fast_effective_temperature

arcondello avatar Dec 21 '21 17:12 arcondello

As part of getting doctest to work had to overflow (beyond 80 characters) some lines, and # doctest: +SKIP to bypass this error: WARNING: broken link: https://www.jstor.org/stable/25464568 (403 Client Error: Forbidden for url: https://www.jstor.org/stable/25464568) Link works fine in compiled documentation.

jackraymond avatar Dec 28 '21 22:12 jackraymond

@jackraymond, looks like this website detects & reject robots from accessing https://www.jstor.org/stable: if you try with curl it returns Please complete this reCAPTCHA to demonstrate that it's you making the requests and not a robot.

We can update code line linkcheck_ignore = [r'https://cloud.dwavesys.com/leap', # redirects, many checks in https://github.com/dwavesystems/dwave-system/blob/master/docs/conf.py and https://github.com/dwavesystems/dwave-ocean-sdk/blob/master/docs/conf.py to ignore URL https://www.jstor.org/stable

JoelPasvolsky avatar Jan 11 '22 20:01 JoelPasvolsky

❤️

davidmerwin avatar Feb 13 '22 02:02 davidmerwin

❤️

davidmerwin avatar Feb 13 '22 02:02 davidmerwin