dwave-hybrid


Namedwave-hybrid JSON
Version 0.6.11 PyPI version JSON
download
home_pagehttps://github.com/dwavesystems/dwave-hybrid
SummaryHybrid Asynchronous Decomposition Solver Framework
upload_time2024-03-01 16:23:35
maintainer
docs_urlNone
authorD-Wave Systems Inc.
requires_python>=3.8
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            .. image:: https://badge.fury.io/py/dwave-hybrid.svg
    :target: https://badge.fury.io/py/dwave-hybrid
    :alt: Latest version on PyPI

.. image:: https://circleci.com/gh/dwavesystems/dwave-hybrid.svg?style=shield
    :target: https://circleci.com/gh/dwavesystems/dwave-hybrid
    :alt: Linux/MacOS/Windows build status

.. image:: https://img.shields.io/codecov/c/github/dwavesystems/dwave-hybrid/master.svg
    :target: https://codecov.io/gh/dwavesystems/dwave-hybrid
    :alt: Code coverage

.. image:: https://img.shields.io/pypi/pyversions/dwave-hybrid.svg?style=flat
    :target: https://pypi.org/project/dwave-hybrid/
    :alt: Supported Python versions


=============
D-Wave Hybrid
=============

.. index-start-marker

A general, minimal Python framework for building hybrid asynchronous decomposition
samplers for quadratic unconstrained binary optimization (QUBO) problems.

*dwave-hybrid* facilitates three aspects of solution development:

*   Hybrid approaches to combining quantum and classical compute resources
*   Evaluating a portfolio of algorithmic components and problem-decomposition strategies
*   Experimenting with workflow structures and parameters to obtain the best application results

The framework enables rapid development and insight into expected performance
of productized versions of its experimental prototypes.

Your optimized algorithmic components and other contributions to this project are welcome!

.. index-end-marker


Installation or Building
========================

.. installation-start-marker

Install from a package on PyPI::

    pip install dwave-hybrid

or from source in development mode::

    git clone https://github.com/dwavesystems/dwave-hybrid.git
    cd dwave-hybrid
    pip install -e .

.. installation-end-marker


Testing
=======

Install test requirements and run ``unittest``::

    pip install -r tests/requirements.txt
    python -m unittest


Example
=======

.. example-start-marker

.. code-block:: python

    import dimod
    import hybrid

    # Construct a problem
    bqm = dimod.BinaryQuadraticModel({}, {'ab': 1, 'bc': -1, 'ca': 1}, 0, dimod.SPIN)

    # Define the workflow
    iteration = hybrid.RacingBranches(
        hybrid.InterruptableTabuSampler(),
        hybrid.EnergyImpactDecomposer(size=2)
        | hybrid.QPUSubproblemAutoEmbeddingSampler()
        | hybrid.SplatComposer()
    ) | hybrid.ArgMin()
    workflow = hybrid.LoopUntilNoImprovement(iteration, convergence=3)

    # Solve the problem
    init_state = hybrid.State.from_problem(bqm)
    final_state = workflow.run(init_state).result()

    # Print results
    print("Solution: sample={.samples.first}".format(final_state))


.. example-end-marker


Documentation
=============

Documentation for latest stable release included in Ocean is available as part
of `Ocean docs <https://docs.ocean.dwavesys.com/en/stable/docs_hybrid/>`_.

License
=======

Released under the Apache License 2.0. See `<LICENSE>`_ file.

Contributing
============

Ocean's `contributing guide <https://docs.ocean.dwavesys.com/en/stable/contributing.html>`_
has guidelines for contributing to Ocean packages.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dwavesystems/dwave-hybrid",
    "name": "dwave-hybrid",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "D-Wave Systems Inc.",
    "author_email": "radomir@dwavesys.com",
    "download_url": "https://files.pythonhosted.org/packages/65/55/f96f88e31f2855742b1cb07fb51ca4112d396adc54eb9e61bd2bea88c8c4/dwave-hybrid-0.6.11.tar.gz",
    "platform": null,
    "description": ".. image:: https://badge.fury.io/py/dwave-hybrid.svg\n    :target: https://badge.fury.io/py/dwave-hybrid\n    :alt: Latest version on PyPI\n\n.. image:: https://circleci.com/gh/dwavesystems/dwave-hybrid.svg?style=shield\n    :target: https://circleci.com/gh/dwavesystems/dwave-hybrid\n    :alt: Linux/MacOS/Windows build status\n\n.. image:: https://img.shields.io/codecov/c/github/dwavesystems/dwave-hybrid/master.svg\n    :target: https://codecov.io/gh/dwavesystems/dwave-hybrid\n    :alt: Code coverage\n\n.. image:: https://img.shields.io/pypi/pyversions/dwave-hybrid.svg?style=flat\n    :target: https://pypi.org/project/dwave-hybrid/\n    :alt: Supported Python versions\n\n\n=============\nD-Wave Hybrid\n=============\n\n.. index-start-marker\n\nA general, minimal Python framework for building hybrid asynchronous decomposition\nsamplers for quadratic unconstrained binary optimization (QUBO) problems.\n\n*dwave-hybrid* facilitates three aspects of solution development:\n\n*   Hybrid approaches to combining quantum and classical compute resources\n*   Evaluating a portfolio of algorithmic components and problem-decomposition strategies\n*   Experimenting with workflow structures and parameters to obtain the best application results\n\nThe framework enables rapid development and insight into expected performance\nof productized versions of its experimental prototypes.\n\nYour optimized algorithmic components and other contributions to this project are welcome!\n\n.. index-end-marker\n\n\nInstallation or Building\n========================\n\n.. installation-start-marker\n\nInstall from a package on PyPI::\n\n    pip install dwave-hybrid\n\nor from source in development mode::\n\n    git clone https://github.com/dwavesystems/dwave-hybrid.git\n    cd dwave-hybrid\n    pip install -e .\n\n.. installation-end-marker\n\n\nTesting\n=======\n\nInstall test requirements and run ``unittest``::\n\n    pip install -r tests/requirements.txt\n    python -m unittest\n\n\nExample\n=======\n\n.. example-start-marker\n\n.. code-block:: python\n\n    import dimod\n    import hybrid\n\n    # Construct a problem\n    bqm = dimod.BinaryQuadraticModel({}, {'ab': 1, 'bc': -1, 'ca': 1}, 0, dimod.SPIN)\n\n    # Define the workflow\n    iteration = hybrid.RacingBranches(\n        hybrid.InterruptableTabuSampler(),\n        hybrid.EnergyImpactDecomposer(size=2)\n        | hybrid.QPUSubproblemAutoEmbeddingSampler()\n        | hybrid.SplatComposer()\n    ) | hybrid.ArgMin()\n    workflow = hybrid.LoopUntilNoImprovement(iteration, convergence=3)\n\n    # Solve the problem\n    init_state = hybrid.State.from_problem(bqm)\n    final_state = workflow.run(init_state).result()\n\n    # Print results\n    print(\"Solution: sample={.samples.first}\".format(final_state))\n\n\n.. example-end-marker\n\n\nDocumentation\n=============\n\nDocumentation for latest stable release included in Ocean is available as part\nof `Ocean docs <https://docs.ocean.dwavesys.com/en/stable/docs_hybrid/>`_.\n\nLicense\n=======\n\nReleased under the Apache License 2.0. See `<LICENSE>`_ file.\n\nContributing\n============\n\nOcean's `contributing guide <https://docs.ocean.dwavesys.com/en/stable/contributing.html>`_\nhas guidelines for contributing to Ocean packages.\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Hybrid Asynchronous Decomposition Solver Framework",
    "version": "0.6.11",
    "project_urls": {
        "Homepage": "https://github.com/dwavesystems/dwave-hybrid"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ee00ddad309f77bc5f18a8815062e64643d14b513bfb481029942e23d8a7793e",
                "md5": "760405a4e037352ffe7672238af15ea2",
                "sha256": "2c84c0e999bb6332f2868e28f324aeb6ac0f6faa6741334499b4e45542774a2f"
            },
            "downloads": -1,
            "filename": "dwave_hybrid-0.6.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "760405a4e037352ffe7672238af15ea2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 77112,
            "upload_time": "2024-03-01T16:23:33",
            "upload_time_iso_8601": "2024-03-01T16:23:33.695405Z",
            "url": "https://files.pythonhosted.org/packages/ee/00/ddad309f77bc5f18a8815062e64643d14b513bfb481029942e23d8a7793e/dwave_hybrid-0.6.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6555f96f88e31f2855742b1cb07fb51ca4112d396adc54eb9e61bd2bea88c8c4",
                "md5": "ae8699fea803c4623094d1c88359fa9e",
                "sha256": "201230a937f92bd820311bdd6dd6ce8b68ff4e35392fe88e31aa8e41849c4eb9"
            },
            "downloads": -1,
            "filename": "dwave-hybrid-0.6.11.tar.gz",
            "has_sig": false,
            "md5_digest": "ae8699fea803c4623094d1c88359fa9e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 64214,
            "upload_time": "2024-03-01T16:23:35",
            "upload_time_iso_8601": "2024-03-01T16:23:35.475993Z",
            "url": "https://files.pythonhosted.org/packages/65/55/f96f88e31f2855742b1cb07fb51ca4112d396adc54eb9e61bd2bea88c8c4/dwave-hybrid-0.6.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-01 16:23:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dwavesystems",
    "github_project": "dwave-hybrid",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "circle": true,
    "requirements": [],
    "lcname": "dwave-hybrid"
}
        
Elapsed time: 0.22120s