Code Monkey home page Code Monkey logo

qiskit-honeywell-provider's Introduction

Qiskit Honeywell Provider

LicenseBuild Status

Qiskit is an open-source framework for working with noisy quantum computers at the level of pulses, circuits, and algorithms.

This project contains a provider that allows access to Honeywell quantum devices.

Installation

You can install the provider using pip:

pip3 install qiskit-honeywell-provider

pip will handle installing all the python dependencies automatically and you will always install the latest version.

Setting up the Honeywell Provider

Once the package is installed, you can access the provider from Qiskit via the following import:

from qiskit.providers.honeywell import Honeywell

You will need credentials for the Honeywell Quantum Service. Credentials are tied to an e-mail address that can be stored on disk with:

Honeywell.save_account('[email protected]')

After the initial saving of your account information, you will be prompted to enter your password which will be used to acquire a token that will enable continuous interaction until it expires. Your password will not be saved to disk and will be required infrequently to update the credentials stored on disk or when a new machine must be authenticated.

The credentials will then be loaded automatically on calls that return Backends, or can be manually loaded with:

Honeywell.load_account()

This will load the most recently saved credentials from disk so that they can be provided for each interaction with Honeywell's devices.

Storing a new account will not invalidate your other stored credentials. You may have an arbitrary number of credentials saved. To delete credentials you can use:

Honeywell.delete_credentials()

Which will delete the current accounts credentials from the credential store. Please keep in mind this only deletes the current accounts credentials, and not all credentials stored.

With credentials loaded you can access the backends from the provider:

backends = Honeywell.backends()
backend = Honeywell.get_backend(device)

You can then use that backend like you would use any other qiskit backend. For example, running a bell state circuit:

from qiskit import *
qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0,1], [0,1])
result = execute(qc, backend).result()
print(result.get_counts(qc))

Using a proxy

To configure a proxy include it in the save account configuration:

Honeywell.save_account('[email protected]', proxies = {'urls': {'http': 'http://user:password@myproxy:8080', 'https': 'http://user:password@myproxy:8080'}})

To remove the proxy you can save with an empty dictionary:

Honeywell.save_account('[email protected]', proxies = {})

The 'urls' field must be a dictionary that maps a protocol type or url to a specific proxy. Additional information/details can be found here.

License

Apache License 2.0.

qiskit-honeywell-provider's People

Contributors

dan1pal avatar dlucchetti avatar mtreinish avatar yelojakit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.