-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Add qiskit-aer (and muparserx) #21404
Conversation
Hi! This is the friendly automated conda-forge-linting service. I wanted to let you know that I linted all conda-recipes in your PR ( Here's what I've got... For recipes/muparserx:
For recipes/muparserx:
Documentation on acceptable licenses can be found here. For recipes/qiskit-aer:
|
Hi! This is the friendly automated conda-forge-linting service. I wanted to let you know that I linted all conda-recipes in your PR ( Here's what I've got... For recipes/qiskit-aer:
|
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
Current status:
|
@conda-forge/help-c-cpp Do you have any suggestions for Also, do you have any feedback regarding run dependencies on the libraries mentioned in second point in my previous comment? |
That happens sometimes. Write an explainer comment in the recipe next to the skip so we know why. |
There are sections in the conda-forge docs that explain how to use both openmp and the BLAS in a recipe. Generally shared libraries are listed in host and not in run because their recipes will have run_exports. |
We support CUDA build variants. If the CUDA package is orthogonal to these packages, then it should get its own recipe. If it is a build variant, then it shares a recipe. |
This is a portability question for Upstream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for already upstreaming your patches.
recipes/muparserx/meta.yaml
Outdated
commands: | ||
- test -f ${PREFIX}/include/muparserx/mpParser.h # [unix] | ||
- test -f ${PREFIX}/lib/libmuparserx${SHLIB_EXT} # [unix] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please existence tests for a CMake and package config file to indicate that they are available.
Thanks, @carterbox, for the review! I am reading up on pinning and run_exports to try to update this PR (I'll bump the version to the one with my patch as well). |
Hi @wshanks, I am from NVIDIA cuQuantum team, also a long time CUDA package maintainer here. I am happy to help with CUDA builds either in this PR, or in subsequent PRs after a feedstock is created. But, due to a Qiskit Aer bug that we just reported (Qiskit/qiskit-aer#1686), currently your cc: @tlubowe for vis (once the CUDA build is setup, the cuQuantum::cuStateVec support can be built by listing |
Indeed. The MPI build for Qiskit Aer would not work for single-node users, as It would require you to build another flavor, following the conda-forge documentation. The cuQuantum feedstock could be one good example. The only extra thing we do is to ensure the Now, the real challenge here is there could be a number of flavors to build if you aim to support them all, due to Aer's design:
so I'd suggest to not worry about MPI until after this feedstock is created. |
Thanks, @leofang! I agree it seems best to defer further builds until after the feedstock is generated. From what you have seen, does it make sense to build a CUDA flavor of the My main use case for qiskit-aer is for running the unit tests of downstream qiskit projects. I don't have a lot of experience working with it directly. |
The current status of this PR is that I think the recipes are in good shape. I opened Qiskit/qiskit-aer#1688 about getting qiskit-aer updated so that the remaining patch can be dropped from the recipe, but I don't think the feedstock needs to wait for that. I opened Qiskit/qiskit-aer#1689 about the build issue on macOS. We can see what the response from qiskit-aer is about that. If qiskit-aer addresses that issue but is not going to release soon, we could backport the change to 0.11.2 as a patch in the recipe and generate the feedstock. Other options would be to generate the feedstock without macOS or to make our own patch for the error, maybe based off of the answer to this StackOverflow question. |
Our build system is set up to build cuda and non-cuda variants. When you add the cuda compiler as a build dependency, we automatically insert a |
I guess @wshanks is asking if it is necessary to maintain the parity between PyPI and conda-forge. The answer is no, especially with regard to GPU packages. pip has no way to detect GPU variants, so people have to encode -gpu or -cu11 etc in the wheel name. It's not the case at all for conda packages. There are ways to default to a CPU only build or a GPU build when updating the recipe. It is also possible to make the two builds mutually exclusive, similar to the |
Yes, partly that, though I think my thinking when answering that question was not totally clear. I was thinking there were two kinds of GPU support -- one where you build against a required GPU-oriented dependency instead of a CPU one and one where you add optional features that require a GPU. It seems like qiskit-aer fits the first case and to switch between versions you need to install or not install the GPU library (some part of CUDA) to signal the preference. If qiskit-aer-gpu added on a way to select CPU or GPU at run time, maybe it would make sense as a separate package but even then maybe for conda it would be better to merge it into the GPU build of the main qiskit-aer. |
On PyPI, AFAIK (This discussion limits to single-node users; in Qiskit Aer, the MPI support is a different story, as there is no runtime option to turn it on/off...) |
@conda-forge-admin, please restart ci |
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
The current status here on my part is that the Linux build seems okay to me now. I was hoping to get at least Linux and Mac supported before merging. I was hoping to get a response to Qiskit/qiskit-aer#1689 for that. Without that though, my plan was to play around with a patch like the one I pointed to there myself, but I have not had time to do that so far. It's fine if anyone wants to help with that. Also, if anyone wants this strongly on Linux, maybe we could merge without Mac and continue work in the new feedstock repo. |
Thanks @wshanks, I was typing while you already responded 🙂 I agree temporarily disabling osx builds is the easiest, we should do that unless you can patch it in ~30 mins or so. As for the patch, this seems to be the way to go: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, no major concerns, only a few quick questions.
I don't have merge privilege here, so let's ping @conda-forge/help-python-c 🙂
- pybind11 | ||
- scikit-build >=0.11.0 | ||
- setuptools >=40.1.0 | ||
- spdlog =1.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Is this necessary? 1.5.0 is quite old.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely not. I took it from qiskit-aer's cmake configuration. Since then it was bumped to 1.9.2 in Qiskit/qiskit-aer#1637 without comment, so I assume the version bump was incidental and not related to the other code changes.
I am not sure what the best practice is here for conda. Since spdlog is a header only project, I was assuming it would only influence the aer binary and not the rest of the conda environment so it was best to mirror the upstream pin, but we could possibly use just set a minimum version?
Edit: so when the recipe bumps to the new version that specifies spdlog 1.9.2, I will update the spdlog version. The question is if it should be bumped early.
- liblapack | ||
- muparserx =4.0.8 | ||
- nlohmann_json =3.1.2 | ||
- numpy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Is NumPy header used at build time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was guessing so since it is in the `build-system.requires of qiskit-aer's pyproject.toml. The main simulator is in C++ with Python bindings, so I was thinking the numpy headers would be needed for passing state vector and density matrix results across that interface. I don't see any direct references to numpy headers in the code but I am not that familiar with pybind11 which might provide a layer between numpy and C++? I think the conversion is partially specified here.
@conda-forge/help-python-c ready for review |
Checklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details).