Skip to content

Commit

Permalink
Merge branch 'main' into always-build-cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
doichanj authored Mar 15, 2024
2 parents 1498f66 + 76b1042 commit 809a784
Show file tree
Hide file tree
Showing 48 changed files with 1,332 additions and 1,127 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
uses: microsoft/[email protected]
if: runner.os == 'Windows'
- name: Install deps
run: python -m pip install -U cibuildwheel==2.16.2
run: python -m pip install -U cibuildwheel==2.16.5
- name: Build Wheels
env:
AER_CMAKE_OPENMP_BUILD: 1
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
sdist:
name: Publish qiskit-aer sdist
runs-on: ubuntu-latest
needs: [publish-shared-wheels]
environment: release
permissions:
id-token: write
Expand Down Expand Up @@ -135,7 +136,6 @@ jobs:
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
Expand Down Expand Up @@ -179,7 +179,6 @@ jobs:
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
Expand Down
51 changes: 33 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,18 @@ jobs:
aer-test/bin/pip check
shell: bash
tests_linux:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
name: Linux Python ${{ matrix.python-version }}${{ matrix.qiskit-extra && format(' ({0})', matrix.qiskit-extra) }}
needs: [sdist, lint]
timeout-minutes: 60
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12.0"]
os: ["ubuntu-latest"]
qiskit-extra: [""]
include:
- python-version: "3.10"
qiskit-extra: "'qiskit>=1.0.0rc1'"

env:
AER_THRUST_BACKEND: OMP
QISKIT_TEST_CAPTURE_STREAMS: 1
Expand All @@ -116,17 +121,19 @@ jobs:
${{ runner.os }}-${{ matrix.python-version}}-pip-test-
${{ runner.os }}-${{ matrix.python-version}}-pip-
${{ runner.os }}-${{ matrix.python-version}}-
- name: Install Deps
run: python -m pip install -U -c constraints.txt -r requirements-dev.txt wheel
- name: Install openblas
run: |
set -e
sudo apt-get update
sudo apt-get install -y libopenblas-dev
shell: bash
- name: Install Aer
- name: Install Aer and dependencies
run: |
python -m pip install -U .
python -m pip install -U \
-c constraints.txt \
-r requirements-dev.txt \
${{ matrix.qiskit-extra }} \
.
- name: Run Tests
run: |
set -e
Expand Down Expand Up @@ -185,13 +192,13 @@ jobs:
stestr run --slowest
shell: bash
tests_macos:
runs-on: ${{ matrix.os }}
runs-on: macOS-latest
name: macOS Python ${{ matrix.python-version }}
needs: [sdist, lint]
timeout-minutes: 60
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", '3.11', "3.12.0"]
os: ["macOS-latest"]
env:
AER_THRUST_BACKEND: OMP
QISKIT_TEST_CAPTURE_STREAMS: 1
Expand All @@ -214,12 +221,13 @@ jobs:
${{ runner.os }}-${{ matrix.python-version}}-pip-test-
${{ runner.os }}-${{ matrix.python-version}}-pip-
${{ runner.os }}-${{ matrix.python-version}}-
- name: Install Deps
- name: Install Aer and dependencies
run: |
set -e
pip install -U -c constraints.txt -r requirements-dev.txt
- name: Install Aer
run: python -m pip install -U .
pip install -U \
-c constraints.txt \
-r requirements-dev.txt \
.
- name: Run Tests
run: |
set -e
Expand All @@ -228,13 +236,13 @@ jobs:
stestr run --slowest
shell: bash
tests_windows:
runs-on: ${{ matrix.os }}
runs-on: windows-2019
name: Windows Python ${{ matrix.python-version }}
needs: ["lint", "sdist"]
timeout-minutes: 60
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12.0"]
os: ["windows-2019"]
env:
AER_THRUST_BACKEND: OMP
QISKIT_TEST_CAPTURE_STREAMS: 1
Expand All @@ -259,15 +267,22 @@ jobs:
${{ runner.os }}-${{ matrix.python-version}}-
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Install Deps
run: python -m pip install -U -c constraints.txt -r requirements-dev.txt wheel build
- name: Install Aer Windows
- name: Build Aer Windows
env:
CMAKE_GENERATOR: "Visual Studio 16 2019"
run: |
set -e
pip install build
python -I -m build --wheel
pip install -U dist/*.whl
shell: bash
- name: Install Aer and dependencies
run: |
set -e
shopt -s failglob
pip install -U \
-c constraints.txt \
-r requirements-dev.txt \
dist/*.whl
shell: bash
- name: Run Tests
env:
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/unit-tests-latest-qiskit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,25 @@ jobs:
${{ runner.os }}-${{ matrix.python-version}}-pip-test-
${{ runner.os }}-${{ matrix.python-version}}-pip-
${{ runner.os }}-${{ matrix.python-version}}-
- name: Install Deps
run: |
python -m pip install -U -c constraints.txt -r requirements-dev.txt wheel
pip install -U git+https://github.com/Qiskit/qiskit.git
- name: Install openblas
run: |
set -e
sudo apt-get update
sudo apt-get install -y libopenblas-dev
shell: bash
- name: Install Aer
- name: Install dependencies and Aer
run: |
python -m pip install -U .
python -m pip install -U setuptools wheel
python -m pip install -U \
-c constraints.txt \
-r requirements-dev.txt \
'git+https://github.com/Qiskit/qiskit.git@main' \
.
- name: Run Tests
run: |
set -e
pip check
rm -rf qiskit_aer
stestr run --slowest
shell: bash


1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ set(AER_LIBRARIES

set(AER_COMPILER_DEFINITIONS ${AER_COMPILER_DEFINITIONS} ${CONAN_DEFINES})
if(SKBUILD) # Terra Addon build
set(AER_LIBRARIES ${AER_LIBRARIES} AER_DEPENDENCY_PKG::muparserx)
add_subdirectory(qiskit_aer/backends/wrappers)
else() # Standalone build
set(AER_LIBRARIES
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
First read the overall project contributing guidelines. These are all
included in the Qiskit documentation:

https://qiskit.org/documentation/contributing_to_qiskit.html
https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md

## Contributing to Aer

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ $ python
```python
import qiskit
from qiskit_aer import AerSimulator
from qiskit.providers.fake_provider import FakeManilaV2
from qiskit_ibm_runtime import QiskitRuntimeService

# Generate 3-qubit GHZ state
circ = qiskit.QuantumCircuit(3)
Expand All @@ -73,10 +73,10 @@ counts_ideal = result_ideal.get_counts(0)
print('Counts(ideal):', counts_ideal)
# Counts(ideal): {'000': 493, '111': 531}

# Construct a noisy simulator backend from an IBMQ backend
# This simulator backend will be automatically configured
# using the device configuration and noise model
backend = FakeManilaV2()
# Construct a simulator using a noise model
# from a real backend.
provider = QiskitRuntimeService()
backend = provider.get_backend("ibm_kyoto")
aersim_backend = AerSimulator.from_backend(backend)

# Perform noisy simulation
Expand All @@ -96,7 +96,7 @@ We use [GitHub issues](https://github.com/Qiskit/qiskit-aer/issues) for tracking

## Next Steps

Now you're set up and ready to check out some of the other examples from the [Aer documentation](https://qiskit.org/ecosystem/aer/).
Now you're set up and ready to check out some of the other examples from the [Aer documentation](https://qiskit.github.io/qiskit-aer/).

## Authors and Citation

Expand Down
8 changes: 0 additions & 8 deletions cmake/conan_utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ macro(setup_conan)
endif()
endif()

if(SKBUILD)
set(REQUIREMENTS ${REQUIREMENTS} muparserx/4.0.8)
list(APPEND AER_CONAN_LIBS muparserx)
if(NOT MSVC)
set(CONAN_OPTIONS ${CONAN_OPTIONS} "muparserx:fPIC=True")
endif()
endif()

if(AER_THRUST_BACKEND AND NOT AER_THRUST_BACKEND STREQUAL "CUDA" AND NOT AER_THRUST_BACKEND STREQUAL "ROCM")
set(REQUIREMENTS ${REQUIREMENTS} thrust/1.9.5)
list(APPEND AER_CONAN_LIBS thrust)
Expand Down
4 changes: 0 additions & 4 deletions cmake/dependency_utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ macro(_use_system_libraries)
_import_aer_system_dependency(nlohmann_json 3.1.1)
_import_aer_system_dependency(spdlog 1.9.2)

if(SKBUILD)
_import_aer_system_dependency(muparserx 4.0.8)
endif()

if(AER_THRUST_BACKEND AND NOT AER_THRUST_BACKEND STREQUAL "CUDA")
string(TOLOWER ${AER_THRUST_BACKEND} THRUST_BACKEND)
_import_aer_system_dependency(Thrust 1.9.5)
Expand Down
4 changes: 1 addition & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

# This code is part of Qiskit.
#
# (C) Copyright IBM 2018.
Expand Down Expand Up @@ -146,5 +144,5 @@
autoclass_content = 'both'
intersphinx_mapping = {
"matplotlib": ("https://matplotlib.org/stable/", None),
"qiskit": ("https://qiskit.org/documentation/", None),
"qiskit": ("https://docs.quantum.ibm.com/api/qiskit/", None),
}
12 changes: 4 additions & 8 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Getting started
Installation
============
Qiskit Aer depends on the main Qiskit package which has its own
`Qiskit Getting Started <https://qiskit.org/documentation/getting_started.html>`__ detailing the
`Qiskit Installation guide <https://docs.quantum.ibm.com/start/install>`__ detailing the
installation options for Qiskit and its supported environments/platforms. You should refer to
that first. Then the information here can be followed which focuses on the additional installation
specific to Qiskit Aer.
Expand All @@ -17,12 +17,9 @@ specific to Qiskit Aer.

.. tab-item:: Start locally

The simplest way to get started is to follow the getting started 'Start locally' for Qiskit
here `Qiskit Getting Started <https://qiskit.org/documentation/getting_started.html>`__
The simplest way to get started is to follow the installation guide for Qiskit `here <https://docs.quantum.ibm.com/start/install>`__

In your virtual environment where you installed Qiskit simply add ``aer`` to the
extra list in a similar manner to how the extra ``visualization`` support is installed for
Qiskit, i.e:
In your virtual environment where you installed Qiskit, add ``qiskit-aer``, e.g.:

.. code:: sh
Expand Down Expand Up @@ -57,8 +54,7 @@ specific to Qiskit Aer.
the latest version of the Qiskit Aer code more efficiently.

Since Qiskit Aer depends on Qiskit, and its latest changes may require new or changed
features of Qiskit, you should first follow Qiskit's `"Install from source"` instructions
here `Qiskit Getting Started <https://qiskit.org/documentation/getting_started.html>`__
features of Qiskit, you should first follow Qiskit's `"Install from source"` instructions `here <https://docs.quantum.ibm.com/start/install-qiskit-source>`__

.. raw:: html

Expand Down
Loading

0 comments on commit 809a784

Please sign in to comment.