Skip to main content

utilities for working with bqpjson data

Project description

release:

https://badge.fury.io/py/bqpjson.svg Documentation Status

dev status:

Build Report Coverage Report Documentation Status

bqpjson is a minimalist python package for working with bqpjson data files, a json-based encoding of binary quadratic programs. A detailed description of the bqpjson data format is available here.

The package can be installed via:

pip install bqpjson

The bqpjson toolset includes:

  • bqpjson - python tools for the validation and transformation of bqpjson data (documentation)

  • bqpjson-schema.json - a JSON-Schema for bqpjson data files

  • spin2bool - a command line tool for converting a bqpjson data files between the spin and boolean variable spaces

  • bqp2qh - a command line tool for converting bqpjson data files into qubist compatible hamiltonians

  • bqp2qubo - a command line tool for converting bqpjson data into qubo data

  • bqp2mzn - a command line tool for converting bqpjson data into a minizinc model

  • bqp2hfs - a command line tool for converting bqpjson data into hfs data

An example of bqpjson data:

{
  "description":"a simple model",
  "id": 0,
  "linear_terms": [
    {"coeff":  1.3, "id": 2},
    {"coeff": -0.7, "id": 6}
  ],
  "metadata": {},
  "offset": 0.0,
  "quadratic_terms": [
    {"coeff": -0.2, "id_head": 4, "id_tail": 2},
    {"coeff":  1.5, "id_head": 6, "id_tail": 2}
  ],
  "scale": 1.0,
  "variable_domain": "spin",
  "variable_ids": [2,4,6],
  "version": "1.0.0"
}

License

bqpjson is developed at Los Alamos National Laboratory and is provided under a BSD-ish license with a “modifications must be indicated” clause. See the LICENSE.md file for the full text. This package is part of the Hybrid Quantum-Classical Computing suite, known internally as LA-CC-16-032.

Changelog

staged

  • nothing

v0.5.2

  • improved bqp2hfs robustness to coefficient precision issues

  • dropped support for python 2.7 and 3.4

v0.5.1

  • added support for translation to the HFS data format

v0.5.0

  • initial release

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

bqpjson-0.5.2.tar.gz (8.4 kB view details)

Uploaded Source

File details

Details for the file bqpjson-0.5.2.tar.gz.

File metadata

  • Download URL: bqpjson-0.5.2.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.7

File hashes

Hashes for bqpjson-0.5.2.tar.gz
Algorithm Hash digest
SHA256 e232f24aded295a6fc0419e730885529210b51969db65309cf4ad1fef3126d9d
MD5 b0adaee0de821f07df1fb72f4b0fd511
BLAKE2b-256 6ed2b0e1ae69489a8ca8389ce597d30553d3ef67e8a997078d4215e58685387b

See more details on using hashes here.

Supported by

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