Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken installation (both via PyPi and GitHub) #26

Closed
vprusso opened this issue May 10, 2023 · 2 comments
Closed

Broken installation (both via PyPi and GitHub) #26

vprusso opened this issue May 10, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@vprusso
Copy link

vprusso commented May 10, 2023

It appears as though one is unable to install the qiskit-quantinuum-provider package either via the PyPi server (as it is not present) or via Git. IOW, doing:

pip3 install qiskit-quantinuum-provider

is broken as the PyPi link is broken. Alternatively, attempting to install the package via Git, that is:

python -m pip install 'qiskit-quantinuum-provider @ git+ https://github.com/qiskit-community/qiskit-quantinuum-provider'

also fails. It seems as if the last commit to this project was at the end of March of 2023. Are there any plans to continue development on this project or has it been deprioritized? If the latter, are there any specific adaptations one would have to do in order to make use of this provider pattern within Qiskit?

fyi @mtreinish, @1ucian0 @chris-theroux

@vprusso vprusso added the bug Something isn't working label May 10, 2023
@1ucian0
Copy link

1ucian0 commented May 10, 2023

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.

@1ucian0 1ucian0 closed this as completed May 10, 2023
@vprusso
Copy link
Author

vprusso commented May 10, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants