Skip to content

dlucchetti/qiskit-honeywell-provider

 
 

Repository files navigation

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. This can either be set via the HQS_API_KEY environment variable, or you can save that token to disk with:

Honeywell.save_account('MYToken')

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

Honeywell.load_account()

which will first check if the env variable is set and use that token and if not it will load any save credentials from disk.

With credentials loaded then 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('MYToken', 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('MYToken', 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.

About

Qiskit provider for Honeywell backends.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%