Skip to content

Commit

Permalink
Merge branch 'main' into restore_arm64_macos
Browse files Browse the repository at this point in the history
  • Loading branch information
hhorii authored Jul 5, 2024
2 parents 4f600a2 + f8d2021 commit af684c8
Show file tree
Hide file tree
Showing 41 changed files with 730 additions and 474 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:
python -m pip install cibuildwheel==2.17.0
- name: Build wheels
env:
CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && rpm -i cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && yum clean all && yum -y install cuda && yum -y install openblas-devel && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo && yum clean all"
CIBW_BEFORE_ALL: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && rpm -i cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && yum clean all && yum -y install cuda && yum -y install openblas-devel && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo && yum clean all"
CIBW_BEFORE_BUILD : "pip cache purge && pip install nvidia-cuda-runtime-cu11 nvidia-cublas-cu11 nvidia-cusolver-cu11 nvidia-cusparse-cu11 cuquantum-cu11"
CIBW_SKIP: "*-manylinux_i686 pp* cp36* cp37* cp38* cp39* cp310* cp311* *musllinux*"
CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu-cu11 QISKIT_AER_CUDA_MAJOR=11 CMAKE_VERBOSE_MAKEFILE=true AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc AER_CUDA_ARCH="7.0 7.2 7.5 8.0 8.6 8.7" AER_PYTHON_CUDA_ROOT=/opt/_internal AER_CIBUILD=true
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
python -m pip install cibuildwheel==2.17.0
- name: Build wheels
env:
CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda-repo-rhel7-12-4-local-12.4.0_550.54.14-1.x86_64.rpm && rpm -i cuda-repo-rhel7-12-4-local-12.4.0_550.54.14-1.x86_64.rpm && yum clean all && yum -y install nvidia-driver-latest-dkms && yum -y install cuda-toolkit-12-4 && yum -y install openblas-devel && yum clean all"
CIBW_BEFORE_ALL: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/12.5.1/local_installers/cuda-repo-rhel8-12-5-local-12.5.1_555.42.06-1.x86_64.rpm && rpm -i cuda-repo-rhel8-12-5-local-12.5.1_555.42.06-1.x86_64.rpm && yum clean all && yum -y install cuda-toolkit-12-5 && yum -y install openblas-devel && yum clean all"
CIBW_BEFORE_BUILD : "pip cache purge && pip install nvidia-cuda-runtime-cu12 nvidia-nvjitlink-cu12 nvidia-cublas-cu12 nvidia-cusolver-cu12 nvidia-cusparse-cu12 cuquantum-cu12"
CIBW_SKIP: "*-manylinux_i686 pp* cp36* cp37* cp38* cp39* cp310* cp311* *musllinux*"
CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu QISKIT_AER_CUDA_MAJOR=12 CMAKE_VERBOSE_MAKEFILE=true AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc AER_CUDA_ARCH="7.0 7.2 7.5 8.0 8.6 8.7 8.9 9.0" AER_PYTHON_CUDA_ROOT=/opt/_internal AER_CIBUILD=true
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BEFORE_ALL_LINUX: "yum install -y https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm && yum install -y openblas-devel"
CIBW_BEFORE_ALL_LINUX: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm && yum install -y openblas-devel"
CIBW_ARCHS_LINUX: aarch64
CIBW_TEST_SKIP: "cp38* cp39* cp310* cp311*"
- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
python -m pip install cibuildwheel==2.16.2
- name: Build wheels
env:
CIBW_BEFORE_ALL: "pip cache purge && yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && rpm -i cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && yum clean all && yum -y install cuda && yum -y install openblas-devel && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo && yum clean all"
CIBW_BEFORE_ALL: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && rpm -i cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && yum clean all && yum -y install cuda && yum -y install openblas-devel && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo && yum clean all"
CIBW_BEFORE_BUILD : "pip install nvidia-cuda-runtime-cu11 nvidia-cublas-cu11 nvidia-cusolver-cu11 nvidia-cusparse-cu11 cuquantum-cu11"
CIBW_SKIP: "*-manylinux_i686 pp* cp36* cp37* *musllinux*"
CIBW_TEST_SKIP: "*"
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
python -m pip install cibuildwheel==2.16.2
- name: Build wheels
env:
CIBW_BEFORE_ALL: "pip cache purge && yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda-repo-rhel7-12-4-local-12.4.0_550.54.14-1.x86_64.rpm && rpm -i cuda-repo-rhel7-12-4-local-12.4.0_550.54.14-1.x86_64.rpm && yum clean all && yum -y install nvidia-driver-latest-dkms && yum -y install cuda-toolkit-12-4 && yum -y install openblas-devel && yum clean all"
CIBW_BEFORE_ALL: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/12.5.1/local_installers/cuda-repo-rhel8-12-5-local-12.5.1_555.42.06-1.x86_64.rpm && rpm -i cuda-repo-rhel8-12-5-local-12.5.1_555.42.06-1.x86_64.rpm && yum clean all && yum -y install cuda-toolkit-12-5 && yum -y install openblas-devel && yum clean all"
CIBW_BEFORE_BUILD : "pip install nvidia-cuda-runtime-cu12 nvidia-nvjitlink-cu12 nvidia-cublas-cu12 nvidia-cusolver-cu12 nvidia-cusparse-cu12 cuquantum-cu12"
CIBW_SKIP: "*-manylinux_i686 pp* cp36* cp37* *musllinux*"
CIBW_TEST_SKIP: "*"
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
env:
CIBW_ARCHS_LINUX: s390x
CIBW_TEST_SKIP: "cp*"
CIBW_BEFORE_ALL: "yum install -y epel-release && yum install -y openblas-devel"
CIBW_BEFORE_ALL: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y epel-release && yum install -y openblas-devel"
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
Expand Down Expand Up @@ -270,7 +270,7 @@ jobs:
env:
CIBW_ARCHS_LINUX: ppc64le
CIBW_TEST_SKIP: "cp*"
CIBW_BEFORE_ALL: "yum install -y epel-release && yum install -y openblas-devel"
CIBW_BEFORE_ALL: "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y epel-release && yum install -y openblas-devel"
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/neko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
branches: ['main', 'stable/*']
concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true
# Only cancel in PR mode. In push mode, don't cancel so we don't see spurious test "failures".
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
neko:
name: Qiskit Neko Integration Tests
Expand All @@ -15,5 +16,7 @@ jobs:
with:
test_selection: backend
repo_install_command: |
pip install scipy==1.13.1
pip install conan
pip install .
pip uninstall -y qiskit qiskit-terra qiskit-aer
pip install -c constraints.txt .
12 changes: 5 additions & 7 deletions docs/tutorials/2_device_noise_simulation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@
},
"outputs": [],
"source": [
"from qiskit import IBMQ, transpile\n",
"from qiskit import QuantumCircuit\n",
"from qiskit import QuantumCircuit, transpile\n",
"from qiskit_aer import AerSimulator\n",
"from qiskit.tools.visualization import plot_histogram"
"from qiskit.visualization import plot_histogram"
]
},
{
Expand Down Expand Up @@ -64,7 +63,7 @@
},
"outputs": [],
"source": [
"from qiskit.providers.fake_provider import FakeVigo\n",
"from qiskit_ibm_runtime.fake_provider import FakeVigo\n",
"device_backend = FakeVigo()"
]
},
Expand Down Expand Up @@ -233,9 +232,8 @@
}
],
"source": [
"import qiskit.tools.jupyter\n",
"%qiskit_version_table\n",
"%qiskit_copyright"
"import qiskit\n",
"qiskit.__version__\n"
]
},
{
Expand Down
7 changes: 3 additions & 4 deletions docs/tutorials/3_building_noise_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"from qiskit import QuantumCircuit, transpile\n",
"from qiskit.quantum_info import Kraus, SuperOp\n",
"from qiskit_aer import AerSimulator\n",
"from qiskit.tools.visualization import plot_histogram\n",
"from qiskit.visualization import plot_histogram\n",
"\n",
"# Import from Qiskit Aer noise module\n",
"from qiskit_aer.noise import (NoiseModel, QuantumError, ReadoutError, \n",
Expand Down Expand Up @@ -868,9 +868,8 @@
}
],
"source": [
"import qiskit.tools.jupyter\n",
"%qiskit_version_table\n",
"%qiskit_copyright"
"import qiskit\n",
"qiskit.__version__\n"
]
}
],
Expand Down
7 changes: 3 additions & 4 deletions docs/tutorials/4_custom_gate_noise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"from qiskit_aer import AerSimulator\n",
"from qiskit_aer.noise import NoiseModel, amplitude_damping_error\n",
"\n",
"from qiskit.tools.visualization import plot_histogram"
"from qiskit.visualization import plot_histogram"
]
},
{
Expand Down Expand Up @@ -486,9 +486,8 @@
}
],
"source": [
"import qiskit.tools.jupyter\n",
"%qiskit_version_table\n",
"%qiskit_copyright"
"import qiskit\n",
"qiskit.__version__\n"
]
},
{
Expand Down
34 changes: 6 additions & 28 deletions docs/tutorials/5_noise_transformation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -317,41 +317,19 @@
"outputs": [
{
"data": {
"text/html": [
"<h3>Version Information</h3><table><tr><th>Qiskit Software</th><th>Version</th></tr><tr><td><code>qiskit</code></td><td>0.24.0.dev0+dba2eff</td></tr><tr><td><code>qiskit-aer</code></td><td>0.11.2</td></tr><tr><td><code>qiskit-ignis</code></td><td>0.7.1</td></tr><tr><td><code>qiskit-ibmq-provider</code></td><td>0.20.0</td></tr><tr><td><code>qiskit</code></td><td>0.41.0</td></tr><tr><th>System information</th></tr><tr><td>Python version</td><td>3.8.11</td></tr><tr><td>Python compiler</td><td>Clang 12.0.5 (clang-1205.0.22.11)</td></tr><tr><td>Python build</td><td>default, Jul 27 2021 10:46:38</td></tr><tr><td>OS</td><td>Darwin</td></tr><tr><td>CPUs</td><td>8</td></tr><tr><td>Memory (Gb)</td><td>64.0</td></tr><tr><td colspan='2'>Wed Feb 15 14:17:23 2023 JST</td></tr></table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
"'1.1.0'"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<div style='width: 100%; background-color:#d5d9e0;padding-left: 10px; padding-bottom: 10px; padding-right: 10px; padding-top: 5px'><h3>This code is a part of Qiskit</h3><p>&copy; Copyright IBM 2017, 2023.</p><p>This code is licensed under the Apache License, Version 2.0. You may<br>obtain a copy of this license in the LICENSE.txt file in the root directory<br> of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.<p>Any modifications or derivative works of this code must retain this<br>copyright notice, and modified files need to carry a notice indicating<br>that they have been altered from the originals.</p></div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
"output_type": "execute_result"
}
],
"source": [
"import qiskit.tools.jupyter\n",
"%qiskit_version_table\n",
"%qiskit_copyright"
"import qiskit\n",
"qiskit.__version__"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -370,7 +348,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.11"
"version": "3.12.3"
},
"varInspector": {
"cols": {
Expand Down
7 changes: 3 additions & 4 deletions docs/tutorials/6_extended_stabilizer_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"source": [
"from qiskit import QuantumCircuit, transpile\n",
"from qiskit_aer import AerSimulator\n",
"from qiskit.tools.visualization import plot_histogram\n",
"from qiskit.visualization import plot_histogram\n",
"\n",
"import random"
]
Expand Down Expand Up @@ -479,9 +479,8 @@
}
],
"source": [
"import qiskit.tools.jupyter\n",
"%qiskit_version_table\n",
"%qiskit_copyright"
"import qiskit\n",
"qiskit.__version__\n"
]
},
{
Expand Down
5 changes: 2 additions & 3 deletions docs/tutorials/7_matrix_product_state_method.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,8 @@
}
],
"source": [
"import qiskit.tools.jupyter\n",
"%qiskit_version_table\n",
"%qiskit_copyright"
"import qiskit\n",
"qiskit.__version__\n"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ test-command = "python {project}/tools/verify_wheels.py"
before-test = "pip install --only-binary=numpy,scipy numpy scipy"

[tool.cibuildwheel.linux]
before-all = "yum install -y openblas-devel"
before-all = "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y openblas-devel"

[tool.cibuildwheel.windows]
environment = { CMAKE_GENERATOR = "Visual Studio 16 2019"}

[[tool.cibuildwheel.overrides]]
select = "cp3{8,9,10,11,12}-manylinux_i686"
before-all = "yum install -y wget && bash {project}/tools/install_openblas_i686.sh && bash {project}/tools/install_rust.sh"
before-all = "sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^#baseurl/baseurl/' -e 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo && yum install -y wget && bash {project}/tools/install_openblas_i686.sh && bash {project}/tools/install_rust.sh"

[tool.black]
line-length = 100
Expand Down
Loading

0 comments on commit af684c8

Please sign in to comment.