dwave-cloud-client


Namedwave-cloud-client JSON
Version 0.11.3 PyPI version JSON
download
home_pagehttps://github.com/dwavesystems/dwave-cloud-client
SummaryA minimal client for interacting with D-Wave cloud resources.
upload_time2024-03-01 15:45:52
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-cloud-client.svg
    :target: https://badge.fury.io/py/dwave-cloud-client
    :alt: Latest version on PyPI

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

.. image:: https://codecov.io/gh/dwavesystems/dwave-cloud-client/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/dwavesystems/dwave-cloud-client
    :alt: Coverage report

.. index-start-marker

==================
dwave-cloud-client
==================

D-Wave Cloud Client is a minimal implementation of the REST interface used to
communicate with D-Wave Sampler API (SAPI) servers.

SAPI is an application layer built to provide resource discovery, permissions,
and scheduling for quantum annealing resources at D-Wave Systems.
This package provides a minimal Python interface to that layer without
compromising the quality of interactions and workflow.

The example below instantiates a D-Wave Cloud Client and solver based on the local
system's auto-detected default configuration file and samples a random Ising problem
tailored to fit the solver's graph.

.. code-block:: python

    import random
    from dwave.cloud import Client

    # Connect using the default or environment connection information
    with Client.from_config() as client:

        # Load the default solver
        solver = client.get_solver()

        # Build a random Ising model to exactly fit the graph the solver supports
        linear = {index: random.choice([-1, 1]) for index in solver.nodes}
        quad = {key: random.choice([-1, 1]) for key in solver.undirected_edges}

        # Send the problem for sampling, include solver-specific parameter 'num_reads'
        computation = solver.sample_ising(linear, quad, num_reads=100)

        # Print the first sample out of a hundred
        print(computation.samples[0])

.. index-end-marker


Installation
------------

.. installation-start-marker

Requires Python 3.8+:

.. code-block:: bash

    pip install dwave-cloud-client

To install from source (available on GitHub in `dwavesystems/dwave-cloud-client`_ repo):

.. code-block:: bash

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

.. _`dwavesystems/dwave-cloud-client`: https://github.com/dwavesystems/dwave-cloud-client

.. installation-end-marker


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.

Release Notes
~~~~~~~~~~~~~

D-Wave Cloud Client uses `reno <https://docs.openstack.org/reno/>`_ to manage
its release notes.

When making a contribution to D-Wave Cloud Client that will affect users, create
a new release note file by running

.. code-block:: bash

    reno new your-short-descriptor-here

You can then edit the file created under ``releasenotes/notes/``.
Remove any sections not relevant to your changes.
Commit the file along with your changes.

See reno's `user guide <https://docs.openstack.org/reno/latest/user/usage.html>`_
for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dwavesystems/dwave-cloud-client",
    "name": "dwave-cloud-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "D-Wave Systems Inc.",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/ea/dc/4321d6eb92a2d41cfdd9bddacae49e9c55099c3d3e00adc92ef7ce3cd347/dwave-cloud-client-0.11.3.tar.gz",
    "platform": null,
    "description": ".. image:: https://badge.fury.io/py/dwave-cloud-client.svg\n    :target: https://badge.fury.io/py/dwave-cloud-client\n    :alt: Latest version on PyPI\n\n.. image:: https://circleci.com/gh/dwavesystems/dwave-cloud-client.svg?style=shield\n    :target: https://circleci.com/gh/dwavesystems/dwave-cloud-client\n    :alt: Linux/MacOS/Windows build status\n\n.. image:: https://codecov.io/gh/dwavesystems/dwave-cloud-client/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/dwavesystems/dwave-cloud-client\n    :alt: Coverage report\n\n.. index-start-marker\n\n==================\ndwave-cloud-client\n==================\n\nD-Wave Cloud Client is a minimal implementation of the REST interface used to\ncommunicate with D-Wave Sampler API (SAPI) servers.\n\nSAPI is an application layer built to provide resource discovery, permissions,\nand scheduling for quantum annealing resources at D-Wave Systems.\nThis package provides a minimal Python interface to that layer without\ncompromising the quality of interactions and workflow.\n\nThe example below instantiates a D-Wave Cloud Client and solver based on the local\nsystem's auto-detected default configuration file and samples a random Ising problem\ntailored to fit the solver's graph.\n\n.. code-block:: python\n\n    import random\n    from dwave.cloud import Client\n\n    # Connect using the default or environment connection information\n    with Client.from_config() as client:\n\n        # Load the default solver\n        solver = client.get_solver()\n\n        # Build a random Ising model to exactly fit the graph the solver supports\n        linear = {index: random.choice([-1, 1]) for index in solver.nodes}\n        quad = {key: random.choice([-1, 1]) for key in solver.undirected_edges}\n\n        # Send the problem for sampling, include solver-specific parameter 'num_reads'\n        computation = solver.sample_ising(linear, quad, num_reads=100)\n\n        # Print the first sample out of a hundred\n        print(computation.samples[0])\n\n.. index-end-marker\n\n\nInstallation\n------------\n\n.. installation-start-marker\n\nRequires Python 3.8+:\n\n.. code-block:: bash\n\n    pip install dwave-cloud-client\n\nTo install from source (available on GitHub in `dwavesystems/dwave-cloud-client`_ repo):\n\n.. code-block:: bash\n\n    pip install -r requirements.txt\n    python setup.py install\n\n.. _`dwavesystems/dwave-cloud-client`: https://github.com/dwavesystems/dwave-cloud-client\n\n.. installation-end-marker\n\n\nLicense\n-------\n\nReleased under the Apache License 2.0. See `<LICENSE>`_ file.\n\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\nRelease Notes\n~~~~~~~~~~~~~\n\nD-Wave Cloud Client uses `reno <https://docs.openstack.org/reno/>`_ to manage\nits release notes.\n\nWhen making a contribution to D-Wave Cloud Client that will affect users, create\na new release note file by running\n\n.. code-block:: bash\n\n    reno new your-short-descriptor-here\n\nYou can then edit the file created under ``releasenotes/notes/``.\nRemove any sections not relevant to your changes.\nCommit the file along with your changes.\n\nSee reno's `user guide <https://docs.openstack.org/reno/latest/user/usage.html>`_\nfor details.\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "A minimal client for interacting with D-Wave cloud resources.",
    "version": "0.11.3",
    "project_urls": {
        "Homepage": "https://github.com/dwavesystems/dwave-cloud-client"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fec5789347e7b41319a623e87d8beaa89230ec564e835aad3f14b2ce9c336b7d",
                "md5": "65fb496c98981f5b159d05f245ab229f",
                "sha256": "b857bb885f24d802d5399e48d9e306507826c7947f2e9739cdc1cf790799a89f"
            },
            "downloads": -1,
            "filename": "dwave_cloud_client-0.11.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "65fb496c98981f5b159d05f245ab229f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 138676,
            "upload_time": "2024-03-01T15:45:50",
            "upload_time_iso_8601": "2024-03-01T15:45:50.009252Z",
            "url": "https://files.pythonhosted.org/packages/fe/c5/789347e7b41319a623e87d8beaa89230ec564e835aad3f14b2ce9c336b7d/dwave_cloud_client-0.11.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eadc4321d6eb92a2d41cfdd9bddacae49e9c55099c3d3e00adc92ef7ce3cd347",
                "md5": "6f3d4dd2d11cac48b48f05cce7fb2775",
                "sha256": "9ee1ffd5a31d0a27e57c8d5a0512bde147cb0e634c96243bfb730a48d2b9812c"
            },
            "downloads": -1,
            "filename": "dwave-cloud-client-0.11.3.tar.gz",
            "has_sig": false,
            "md5_digest": "6f3d4dd2d11cac48b48f05cce7fb2775",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 116368,
            "upload_time": "2024-03-01T15:45:52",
            "upload_time_iso_8601": "2024-03-01T15:45:52.150452Z",
            "url": "https://files.pythonhosted.org/packages/ea/dc/4321d6eb92a2d41cfdd9bddacae49e9c55099c3d3e00adc92ef7ce3cd347/dwave-cloud-client-0.11.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-01 15:45:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dwavesystems",
    "github_project": "dwave-cloud-client",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "circle": true,
    "requirements": [],
    "lcname": "dwave-cloud-client"
}
        
Elapsed time: 0.23960s