Skip to main content

General Ising graph simulated annealing solver

Project description

> :warning: dwave-neal is deprecated in favor of dwave-samplers.

https://img.shields.io/pypi/v/dwave-neal.svg https://codecov.io/gh/dwavesystems/dwave-neal/branch/master/graph/badge.svg https://readthedocs.com/projects/d-wave-systems-dwave-neal/badge/?version=latest https://circleci.com/gh/dwavesystems/dwave-neal.svg?style=svg

dwave-neal

An implementation of a simulated annealing sampler.

A simulated annealing sampler can be used for approximate Boltzmann sampling or heuristic optimization. This implementation approaches the equilibrium distribution by performing updates at a sequence of increasing beta values, beta_schedule, terminating at the target beta. Each spin is updated once in a fixed order per point in the beta_schedule according to a Metropolis- Hastings update. When beta is large the target distribution concentrates, at equilibrium, over ground states of the model. Samples are guaranteed to match the equilibrium for long ‘smooth’ beta schedules.

For more information, see Kirkpatrick, S.; Gelatt Jr, C. D.; Vecchi, M. P. (1983). “Optimization by Simulated Annealing”. Science. 220 (4598): 671–680

Example Usage

import neal

sampler = neal.SimulatedAnnealingSampler()

h = {0: -1, 1: -1}
J = {(0, 1): -1}
sampleset = sampler.sample_ising(h, J)

Installation

To install:

pip install dwave-neal

To build from source:

pip install -r requirements.txt
python setup.py build_ext --inplace
python setup.py install

License

Released under the Apache License 2.0. See LICENSE file.

Contributing

Ocean’s contributing guide has guidelines for contributing to Ocean packages.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dwave-neal-0.6.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dwave_neal-0.6.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file dwave-neal-0.6.0.tar.gz.

File metadata

  • Download URL: dwave-neal-0.6.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.12

File hashes

Hashes for dwave-neal-0.6.0.tar.gz
Algorithm Hash digest
SHA256 8ce51fee3339195df1ab69920fdb5afc496b5fd945e487fad3547c983d90c564
MD5 2566e8ea06108de3d88ed4b670471def
BLAKE2b-256 847ce368bbddb111958f64d4fdd58d4a0e01f8dc16d56fe89c7abdb028fbb029

See more details on using hashes here.

File details

Details for the file dwave_neal-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: dwave_neal-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.12

File hashes

Hashes for dwave_neal-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b7d89f0c52de6ac80e0f580ec272f6409b1cf9edb12250d22429425a13bd935
MD5 0c369b3dd9232192d8557b187856c880
BLAKE2b-256 64f232c45bcc42196f69f101549abf35fc6019ef3488c8d4082fbcab22d77274

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page