dwave-cloud-client


Namedwave-cloud-client JSON
Version 0.13.2 PyPI version JSON
download
home_pagehttps://github.com/dwavesystems/dwave-cloud-client
SummaryA minimal client for interacting with D-Wave cloud resources.
upload_time2024-11-26 15:13:16
maintainerNone
docs_urlNone
authorD-Wave Systems Inc.
requires_python>=3.9
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": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "D-Wave Systems Inc.",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ea/87/cfde09863c591089f49d2dbc7491db189ecf6187a0554c3e8e24b5d1fece/dwave_cloud_client-0.13.2.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.13.2",
    "project_urls": {
        "Homepage": "https://github.com/dwavesystems/dwave-cloud-client"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6730c6ebd317c1a6e91398725cc2e83c3c9f6c7fe7c4c3b433297dd9c8e85f27",
                "md5": "3b2230b7a340e4d00745a13dee80c5e2",
                "sha256": "32c450fcced571fe4dcdd48e936dcc2a63b083b08df126c3777c64fdaf1a31e0"
            },
            "downloads": -1,
            "filename": "dwave_cloud_client-0.13.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3b2230b7a340e4d00745a13dee80c5e2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 158647,
            "upload_time": "2024-11-26T15:13:14",
            "upload_time_iso_8601": "2024-11-26T15:13:14.646590Z",
            "url": "https://files.pythonhosted.org/packages/67/30/c6ebd317c1a6e91398725cc2e83c3c9f6c7fe7c4c3b433297dd9c8e85f27/dwave_cloud_client-0.13.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea87cfde09863c591089f49d2dbc7491db189ecf6187a0554c3e8e24b5d1fece",
                "md5": "f2016a281457d82f5d01e28a149beb33",
                "sha256": "e616a61c70b9c917bbb3f149446aa63c6977bafb225c0dd7b7918068c5fcc218"
            },
            "downloads": -1,
            "filename": "dwave_cloud_client-0.13.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f2016a281457d82f5d01e28a149beb33",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 187318,
            "upload_time": "2024-11-26T15:13:16",
            "upload_time_iso_8601": "2024-11-26T15:13:16.123967Z",
            "url": "https://files.pythonhosted.org/packages/ea/87/cfde09863c591089f49d2dbc7491db189ecf6187a0554c3e8e24b5d1fece/dwave_cloud_client-0.13.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-26 15:13:16",
    "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.34874s