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

cvxpy needed by noise transformations but not installed #490

Closed
nonhermitian opened this issue Dec 10, 2019 · 5 comments
Closed

cvxpy needed by noise transformations but not installed #490

nonhermitian opened this issue Dec 10, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@nonhermitian
Copy link
Contributor

Informations

  • Qiskit Aer version: 0.3.4
  • Python version: 3.7
  • Operating system: Win

What is the current behavior?

cvxpy is needed for noise transformations but is not installed when installing Aer with the Qiskit meta-package. It is in the requirements-dev, but not in the setup.

Steps to reproduce the problem

What is the expected behavior?

Suggested solutions

@nonhermitian nonhermitian added the bug Something isn't working label Dec 10, 2019
@chriseclectic
Copy link
Member

Is it not installed by qiskit-ignis either?

@nonhermitian
Copy link
Contributor Author

@atilag
Copy link
Member

atilag commented Dec 12, 2019

Is it probably a transitive dependency? I've never needed to install it.
Anyway, yes, we have to add it to the setup.py.

@chriseclectic
Copy link
Member

chriseclectic commented Dec 12, 2019

It was always intended as an optional dependenc since it is only used by one not frequently used function. That is is why the import is handled only when that function is called. I'm not sure what the best way to handle these are. Should we add a warning for that function, something like:

def function_that_uses_cvxpy():
    try:
        import cvxpy
    except <whatever exception for module not found is>:
        logger.warn("<this function> requires CVXPy. Please install with `pip install cvxpy`")
        throw NoiseError("CVXPy package not installed.")

@chriseclectic chriseclectic added this to the Qiskit Aer 0.4 milestone Jan 9, 2020
@chriseclectic chriseclectic mentioned this issue Jan 9, 2020
13 tasks
@atilag
Copy link
Member

atilag commented Jan 15, 2020

Fixed in #520

@atilag atilag closed this as completed Jan 15, 2020
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

3 participants