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

update pypi package #866

Open
thepineapplepirate opened this issue Dec 2, 2024 · 5 comments
Open

update pypi package #866

thepineapplepirate opened this issue Dec 2, 2024 · 5 comments
Labels
type: question 🙋 Question about the code or its uses

Comments

@thepineapplepirate
Copy link

thepineapplepirate commented Dec 2, 2024

Environment

  • Qiskit Machine Learning version:
  • Python version:
  • Operating system:

What is happening?

The version of this codebase seems to be different that what is currently on pypi. I found out about this when trying to pass the pass_manager argument to samplerQNN.py (as seen in the documentation https://qiskit-community.github.io/qiskit-machine-learning/stubs/qiskit_machine_learning.neural_networks.SamplerQNN.html) and it did not exist.

How can we reproduce the issue?

  1. pip install qiskit_machine_learning (latest version, 0.8)
  2. import sampler_qnn.py or estimator_qnn.py, run a simple python script calling either function, and try to pass the pass_manager argument.

What should happen?

you will get an error that looks like this

TypeError: SamplerQNN.init() got an unexpected keyword argument 'pass_manager'

Any suggestions?

I would make sure that the latest version of the codebase that is downloadable via pip, is actually reflecting the source code on github. This is in part preventing running these algorithms on actual hardware since the backend needs to be passed through the pass_manager.

I only noticed this with estimator_qnn.py and sampler_qnn.py, but I would imagine other parts of the code could also need updated.

@OkuyanBoga
Copy link
Collaborator

OkuyanBoga commented Dec 9, 2024

Hopefuly, version 0.8.1 will solve this issue, thank you for the feedback.

@edoaltamura
Copy link
Collaborator

Version 0.8.1 is out now - is this issue persisting @thepineapplepirate?

@thepineapplepirate
Copy link
Author

I will try to test it. I can see that the installed package now does have the pass_manager in the sampler_qnn class in sampler_qnn.py. There are still differences in sampler_qnn..py, between this pypi version and what is in this github repo, however. I also notice that when installed directly from the github repo, the version is 0.9, rather than 0.8.1 -- is this expected?

@edoaltamura
Copy link
Collaborator

Pypi installs the latest stable version from the branch stable/0.x (see here), and not the main branch, which is the (beta) development one. Are you comparing your local install with the correct stable branch?

0.9 is strange indeed, and not expected - it should read 0.8.1. @OkuyanBoga and I will discuss this issue later in the week and get back with a plan.

@edoaltamura edoaltamura added the type: bug 🐞 Something isn't working label Dec 16, 2024
@edoaltamura
Copy link
Collaborator

@thepineapplepirate could you please point me to where version 0.9 appears? Are you directly installing from setup.py or project.toml?

PS: If so, we could flag this behaviour in another issue, as it would not be linked to Pypi, which appears to be correctly in sync with the release history: https://pypi.org/project/qiskit-machine-learning/#history

@edoaltamura edoaltamura added type: question 🙋 Question about the code or its uses and removed type: bug 🐞 Something isn't working labels Dec 19, 2024
@edoaltamura edoaltamura removed this from the v.0.8.1 milestone Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question 🙋 Question about the code or its uses
Projects
None yet
Development

No branches or pull requests

3 participants