Code Monkey home page Code Monkey logo

Comments (2)

1ucian0 avatar 1ucian0 commented on July 19, 2024

Because there was not release after the rename, you should be able to still do pip install qiskit-honeywell-provider. You can also install from github like this:

pip install https://github.com/qiskit-community/qiskit-quantinuum-provider/archive/refs/heads/master.zip

If the issue is that a release should be done, maybe you can argue for this in a new issue. Let me know if this does not solve your problem and this issue should be reopen.

from qiskit-quantinuum-provider.

vprusso avatar vprusso commented on July 19, 2024

Hi @1ucian0

Thanks for the quick reply.

Because there was not release after the rename, you should be able to still do pip install qiskit-honeywell-provider. You can also install from github like this:

This would be great to provide in the README. Otherwise, I'm not sure if it would be possible for users to be aware of this. Perhaps this is obvious to those internally, but for me, this was definitely a surprise :)

Regarding being able to use the package, I have a question about usage. I see that the .save_account method naturally points to the Honeywell page for user login. Naturally, I'd rather use the qapi.quantinuum.com/ URL instead. I see that one can configure this (in principle) in the proxies variable

    import os
    from qiskit.providers.honeywell import Honeywell
    USERNAME = os.environ.get("QUANTINUUM_USERNAME")
    PASSWORD = os.environ.get("QUANTINUUM_PASSWORD")
    Honeywell.save_account(USERNAME, 
                           proxies = { 'urls': {'http':
                           f'http://{USERNAME}:{PASSWORD}@qapi.quantinuum.com/',
                           'https':
                           f'http://{USERNAME}:{PASSWORD}@qapi.quantinuum.com/'
                           } })

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

However, this seems to fail is appears to be pointing to the Honeywell login link despite the fact that (I thought) I was configuring it to login to a different URL. I'm most likely doing something wrong, but is it obvious what that might be? Thank you again for your help!

Here is the error output upon trying to call the associated save_account method:

/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/__init__.py:38: FutureWarning: This is the final release of qiskit-honeywell-provider. It will be replaced by the qiskit-quantinuum-provider package in the future.
  warnings.warn("This is the final release of qiskit-honeywell-provider. "
Enter your password: 
Traceback (most recent call last):
  File "/Users/vincent.russo/Projects/resarch/unitary_fund/metriq-api/benchmark/benchmark/QC-App-Oriented-Benchmarks/quantum-fourier-transform/qiskit/qft_benchmark.py", line 427, in <module>
    backends = Honeywell.backends()
               ^^^^^^^^^^^^^^^^^^^^
  File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/honeywellprovider.py", line 92, in backends
    if not self._api.has_token():
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/api/honeywellclient.py", line 76, in has_token
    return bool(self.client_api.session.credentials.access_token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/api/session.py", line 96, in credentials
    self.update_auth()
  File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/api/session.py", line 89, in update_auth
    self.headers.update({'Authorization': self._credentials.access_token})
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/credentials/credentials.py", line 146, in access_token
    return self._login()
           ^^^^^^^^^^^^^
  File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/credentials/credentials.py", line 274, in _login
    self._authenticate()
  File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/credentials/credentials.py", line 205, in _authenticate
    status_code, message = self._request_tokens(body)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/credentials/credentials.py", line 155, in _request_tokens
    response = sess.post(
               ^^^^^^^^^^
  File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/requests/sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/vincent.russo/Library/Caches/pypoetry/virtualenvs/benchmark-Is--SOOG-py3.11/lib/python3.11/site-packages/qiskit/providers/honeywell/api/session.py", line 170, in request
    raise RequestsApiError(ex, message) from None
qiskit.providers.honeywell.api.exceptions.RequestsApiError: HTTPSConnectionPool(host='qapi.honeywell.com', port=443): Max retries exceeded with url: /v1/login (Caused by ProxyError('Cannot connect to prox

from qiskit-quantinuum-provider.

Related Issues (9)

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.