Skip to main content

Tune D-Wave QPU solver parameters

Project description

D-Wave Tuner

dwave-tuner simplifies the process of tuning annealing parameters, allowing you to concentrate on your model and specific problem. Simply specify the number of embeddings, chain strengths, and annealing times, and watch as dwave-tuner tailors the tuning experience to your needs.

Features

  • Effortless parameter tuning: Grid scan chain strengths and annealing times with a given number of embeddings.
  • Caching for efficiency: D-Wave responses are cached by default, enhancing performance by utilizing cached results unless you modify the scan or alter the parameters.
  • User-Friendly: Minimal configuration; just specify your preferences in a dictionary, and let dwave-tuner handle the details.

Example Usage

import dwavetuner

Specify the scan parameters:

parameters = {
    'num_embeddings': 10,
    'num_chain_strengths': 1,
    'num_reads': 1000,
    'num_reps': 1
}

Create a Scanner to schedule the Jobs:

scanner = dwavetuner.Scanner(my_model.bqm, label='my_model', **parameters)

Perform a grid scan

scanner.grid_scan()

The grid scan stores the results in scanner.results. It returns a response that can also be accessed via

print(scanner.response)

The verbose tuning data can be accessed via

x, ys, yerrs = scanner.scan_results('chain_strength')

For annealing time scans, replace chain_strength with annealing_time.

Note that x is one list, while ys an yerrs contain scanner.num_embeddings lists - one for each embedding.

Alternatively, use these self-explanatory parameters:

# Scan chain strengths
parameters = {
    'num_embeddings': 10,
    'chain_strengths_start': 0.24,
    'chain_strengths_end': 0.44,
    'num_chain_strengths': 10,
    'num_reads': 100,
    'num_reps': 1
}

# Scan annealing times
parameters = {
    'chain_strength': 0.28,
    'num_annealing_times': 10,
    'num_reads': 100,
    'num_reps': 5
}

Author

Orkun Şensebat

git@senseb.at

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-tuner-0.0.4.tar.gz (7.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_tuner-0.0.4-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file dwave-tuner-0.0.4.tar.gz.

File metadata

  • Download URL: dwave-tuner-0.0.4.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for dwave-tuner-0.0.4.tar.gz
Algorithm Hash digest
SHA256 95fa99d79df532f07614903deee0317bcd17553ad6aa4733220ba9a2e4e08ea2
MD5 1aac3c7ad96d4426d85fb61ecabb2322
BLAKE2b-256 ef04c835f085013316c39f9d274b151b697fb1e2a2037c0f3e135920005f65d8

See more details on using hashes here.

File details

Details for the file dwave_tuner-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: dwave_tuner-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for dwave_tuner-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 72bd0357de278a7d7e8f7d5da1ac8fc94cb3f775d78a06fb9ee6cc927d3b3140
MD5 d6d200d9c6c885925fbe46e947d503c6
BLAKE2b-256 88906217e31507e054f901fa02ea699b1b5b79de7c23bc3826e0bcba21f5e5d9

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