Skip to content

Commit

Permalink
Merge pull request #2346 from Ericgig/prepare_qutip_v5.0.0b1
Browse files Browse the repository at this point in the history
Prepare qutip v5.0.0b1
  • Loading branch information
Ericgig committed Mar 5, 2024
2 parents 41eccc9 + 3299f53 commit 7cfbdda
Show file tree
Hide file tree
Showing 176 changed files with 7,864 additions and 5,162 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Expand Up @@ -57,7 +57,7 @@ jobs:
# For the sdist we should be as conservative as possible with our
# Python version. This should be the lowest supported version. This
# means that no unsupported syntax can sneak through.
python-version: '3.8'
python-version: '3.9'

- name: Install pip build
run: |
Expand Down Expand Up @@ -107,11 +107,11 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
env:
# Set up wheels matrix. This is CPython 3.8--3.10 for all OS targets.
CIBW_BUILD: "cp3{8,9,10,11}-*"
# Set up wheels matrix. This is CPython 3.9--3.12 for all OS targets.
CIBW_BUILD: "cp3{9,10,11,12}-*"
# Numpy and SciPy do not supply wheels for i686 or win32 for
# Python 3.10+, so we skip those:
CIBW_SKIP: "*-musllinux* cp3{8,9,10,11}-manylinux_i686 cp3{8,9,10,11}-win32"
CIBW_SKIP: "*-musllinux* *-manylinux_i686 *-win32"
OVERRIDE_VERSION: ${{ github.event.inputs.override_version }}

steps:
Expand All @@ -121,7 +121,7 @@ jobs:
name: Install Python
with:
# This is about the build environment, not the released wheel version.
python-version: '3.8'
python-version: '3.9'

- name: Install cibuildwheel
run: |
Expand Down Expand Up @@ -165,12 +165,12 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.8'
python-version: '3.9'

- name: Verify this is not a dev version
shell: bash
run: |
python -m pip install wheels/*-cp38-cp38-manylinux*.whl
python -m pip install wheels/*-cp39-cp39-manylinux*.whl
python -c 'import qutip; print(qutip.__version__); assert "dev" not in qutip.__version__; assert "+" not in qutip.__version__'
# We built the zipfile for convenience distributing to Windows users on
Expand Down Expand Up @@ -198,12 +198,12 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.8'
python-version: '3.9'

- name: Verify this is not a dev version
shell: bash
run: |
python -m pip install wheels/*-cp38-cp38-manylinux*.whl
python -m pip install wheels/*-cp39-cp39-manylinux*.whl
python -c 'import qutip; print(qutip.__version__); assert "dev" not in qutip.__version__; assert "+" not in qutip.__version__'
# We built the zipfile for convenience distributing to Windows users on
Expand Down
102 changes: 64 additions & 38 deletions .github/workflows/tests.yml
Expand Up @@ -27,56 +27,51 @@ jobs:
os: [ubuntu-latest]
# Test other versions of Python in special cases to avoid exploding the
# matrix size; make sure to test all supported versions in some form.
python-version: ["3.9"]
python-version: ["3.11"]
case-name: [defaults]
numpy-requirement: [">=1.20,<1.21"]
numpy-requirement: [">=1.22"]
scipy-requirement: [">=1.8"]
coverage-requirement: ["==6.5"]
# Extra special cases. In these, the new variable defined should always
# be a truth-y value (hence 'nomkl: 1' rather than 'mkl: 0'), because
# the lack of a variable is _always_ false-y, and the defaults lack all
# the special cases.
include:
# Mac
# Mac has issues with MKL since september 2022.
- case-name: macos
os: macos-latest
python-version: "3.10"
condaforge: 1
nomkl: 1

# Scipy 1.5
- case-name: old SciPy
# Python 3.9, Scipy 1.7, numpy 1.22
# On more version than suggested by SPEC 0
# https://scientific-python.org/specs/spec-0000/
# There are deprecation warnings when using cython 0.29.X
- case-name: Old setup
os: ubuntu-latest
python-version: "3.8"
numpy-requirement: ">=1.20,<1.21"
scipy-requirement: ">=1.5,<1.6"
python-version: "3.9"
scipy-requirement: ">=1.8,<1.9"
numpy-requirement: ">=1.22,<1.23"
condaforge: 1
oldcython: 1
pytest-extra-options: "-W ignore:dep_util:DeprecationWarning"

# No MKL runs. MKL is now the default for conda installations, but
# not necessarily for pip.
- case-name: no MKL
# Python 3.10, no mkl, scipy 1.9, numpy 1.23
# Scipy 1.9 did not support cython 3.0 yet.
# cython#17234
- case-name: no mkl
os: ubuntu-latest
python-version: "3.9"
numpy-requirement: ">=1.20,<1.21"
python-version: "3.10"
scipy-requirement: ">=1.9,<1.10"
numpy-requirement: ">=1.23,<1.24"
condaforge: 1
oldcython: 1
nomkl: 1
pytest-extra-options: "-W ignore:dep_util:DeprecationWarning"

# Builds without Cython at runtime. This is a core feature;
# everything should be able to run this.
- case-name: no Cython
os: ubuntu-latest
python-version: "3.8"
nocython: 1

# Python 3.10 and numpy 1.22
# Use conda-forge to provide numpy 1.22
- case-name: Python 3.10
# Python 3.10, no cython, scipy 1.10, numpy 1.24
- case-name: no cython
os: ubuntu-latest
python-version: "3.10"
condaforge: 1
oldcython: 1
scipy-requirement: ">=1.10,<1.11"
numpy-requirement: ">=1.24,<1.25"
nocython: 1

# Python 3.11 and latest numpy
# Python 3.11 and recent numpy
# Use conda-forge to provide Python 3.11 and latest numpy
# Ignore deprecation of the cgi module in Python 3.11 that is
# still imported by Cython.Tempita. This was addressed in
Expand All @@ -86,22 +81,43 @@ jobs:
os: ubuntu-latest
python-version: "3.11"
condaforge: 1
scipy-requirement: ">=1.11,<1.12"
numpy-requirement: ">=1.25,<1.26"
conda-extra-pkgs: "suitesparse" # for compiling cvxopt
pytest-extra-options: "-W ignore::DeprecationWarning:Cython.Tempita"

# Python 3.12 and latest numpy
# Use conda-forge to provide Python 3.11 and latest numpy
- case-name: Python 3.12
os: ubuntu-latest
python-version: "3.12"
scipy-requirement: ">=1.12,<1.13"
numpy-requirement: ">=1.26,<1.27"
condaforge: 1
pytest-extra-options: "-W ignore:datetime:DeprecationWarning"
# Install mpi4py to test mpi_pmap
# Should be enough to include this in one of the runs
includempi: 1

# Mac
# Mac has issues with MKL since september 2022.
- case-name: macos
os: macos-latest
python-version: "3.11"
condaforge: 1
nomkl: 1

# Windows. Once all tests pass without special options needed, this
# can be moved to the main os list in the test matrix. All the tests
# that fail currently seem to do so because mcsolve uses
# multiprocessing under the hood. Windows does not support fork()
# well, which makes transfering objects to the child processes
# error prone. See, e.g., https://github.com/qutip/qutip/issues/1202
- case-name: Windows Latest
- case-name: Windows
os: windows-latest
python-version: "3.10"
python-version: "3.11"

steps:
- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
Expand All @@ -113,7 +129,7 @@ jobs:
# rather than in the GitHub Actions file directly, because bash gives us
# a proper programming language to use.
run: |
QUTIP_TARGET="tests,graphics,semidefinite,ipython"
QUTIP_TARGET="tests,graphics,semidefinite,ipython,extras"
if [[ -z "${{ matrix.nocython }}" ]]; then
QUTIP_TARGET="$QUTIP_TARGET,runtime_compilation"
fi
Expand All @@ -133,6 +149,10 @@ jobs:
if [[ -n "${{ matrix.conda-extra-pkgs }}" ]]; then
conda install "${{ matrix.conda-extra-pkgs }}"
fi
if [[ "${{ matrix.includempi }}" ]]; then
# Use openmpi because mpich causes problems. Note, environment variable names change in v5
conda install "openmpi<5" mpi4py
fi
python -m pip install -e .[$QUTIP_TARGET]
python -m pip install "coverage${{ matrix.coverage-requirement }}"
python -m pip install pytest-cov coveralls pytest-fail-slow
Expand Down Expand Up @@ -164,6 +184,12 @@ jobs:
# truly being executed.
export QUTIP_NUM_PROCESSES=2
fi
if [[ "${{ matrix.includempi }}" ]]; then
# By default, the max. number of allowed worker processes in openmpi is
# (number of physical cpu cores) - 1.
# We only have 2 physical cores, but we want to test mpi_pmap with 2 workers.
export OMPI_MCA_rmaps_base_oversubscribe=true
fi
pytest -Werror --strict-config --strict-markers --fail-slow=300 --durations=0 --durations-min=1.0 --verbosity=1 --cov=qutip --cov-report= --color=yes ${{ matrix.pytest-extra-options }} qutip/tests
# Above flags are:
# -Werror
Expand Down
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -48,7 +48,11 @@ Support
[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org)

We are proud to be affiliated with [Unitary Fund](https://unitary.fund) and [numFOCUS](https://numfocus.org).
QuTiP development is supported by [Nori's lab](https://dml.riken.jp/) at RIKEN, by the University of Sherbrooke, and by Aberystwyth University, [among other supporting organizations](https://qutip.org/#supporting-organizations).

We are grateful for [Nori's lab](https://dml.riken.jp/) at RIKEN and [Blais' lab](https://www.physique.usherbrooke.ca/blais/) at the Institut Quantique
for providing developer positions to work on QuTiP.

We also thank Google for supporting us by financing GSoC students to work on the QuTiP as well as [other supporting organizations](https://qutip.org/#supporting-organizations) that have been supporting QuTiP over the years.


Installation
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
5.0.0a2
5.0.0b1
2 changes: 1 addition & 1 deletion doc/QuTiP_tree_plot/qutip-structure.py
Expand Up @@ -37,7 +37,7 @@
("#043c6b", {"settings", "configrc", "solver"}),
# Visualisation
("#3f8fd2", {
"bloch", "bloch3d", "sphereplot", "orbital", "visualization", "wigner",
"bloch", "sphereplot", "orbital", "visualization", "wigner",
"distributions", "tomography", "topology",
}),
# Operators
Expand Down

0 comments on commit 7cfbdda

Please sign in to comment.