Repository: quantumlib/qsim (language: python)

Issue:
Can't install later than qsim 0.9.5 with python 3.10
On machines which only have python 3.10 installed, running `pip install qsimcirq` gets version 0.9.5 with the following error message for later versions: `none of the wheel's tags (<wheel>) are compatible`.

It is possible to work around this by installing an older python version (e.g. using `pyenv`), but ideally users shouldn't need to worry about their python version as long as they have at least python 3.7.

To fix this, we should add a python 3.10 wheel to the release.


Discussion / hints:
Thanks, Orion, we also hit this issue today 🙏
Reopening because the 0.13.1 release does not have python 3.10 wheels, despite being clearly logged in the workflow printout.
Aha! From the cibuildwheel changelogs:

> **v2.0.0**
> 🌟 Added the ability to test building wheels on CPython 3.10!

So we need to bump our cibuildwheel version as well.
Back again, as advancing cibuildwheel still does not fix the issue.
It's _possible_ that the `setup-python` version we use does not support python 3.10 (or at least doesn't install it by default). I'll try advancing that version as well.

Fix patch:
diff --git a/.github/workflows/release_wheels.yml b/.github/workflows/release_wheels.yml
index 26ac79c2..735079ad 100644
--- a/.github/workflows/release_wheels.yml
+++ b/.github/workflows/release_wheels.yml
@@ -15,20 +15,21 @@ jobs:
           - os: macos-10.15
             name: mac
             cibw:
-              build: "cp36* cp37* cp38* cp39* cp310*"
+              build: "cp37* cp38* cp39* cp310*"
           - os: ubuntu-20.04
             name: manylinux2014
             cibw:
               arch: x86_64
-              build: "cp36* cp37* cp38* cp39* cp310*"
+              build: "cp37* cp38* cp39* cp310*"
               manylinux_image: manylinux2014
           - os: windows-2019
             name: win_amd64
             architecture: x64
             cibw:
-              build: "cp36-win_amd64 cp37-win_amd64 cp38-win_amd64 cp39-win_amd64 cp310-win_amd64"
+              build: "cp37-win_amd64 cp38-win_amd64 cp39-win_amd64 cp310-win_amd64"
     env:
       CIBW_BUILD: "${{ matrix.cibw.build || '*' }}"
+      CIBW_SKIP: "*musllinux*"
       CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}"
       CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_image }}"
       CIBW_BEFORE_BUILD_MACOS: "brew install libomp llvm"
@@ -46,7 +47,7 @@ jobs:
       - uses: actions/setup-python@v2
 
       - name: Install cibuildwheel and twine
-        run: python -m pip install cibuildwheel==2.0.1
+        run: python -m pip install cibuildwheel==2.2.2
 
       - name: Run C++ tests
         run: bash build_tools/test_libs.sh
diff --git a/pybind_interface/GetPybind11.cmake b/pybind_interface/GetPybind11.cmake
index f93c2bf6..e60d20da 100644
--- a/pybind_interface/GetPybind11.cmake
+++ b/pybind_interface/GetPybind11.cmake
@@ -1,6 +1,6 @@
 include(FetchContent)
 
-set(MIN_PYBIND_VERSION "2.2.4")
+set(MIN_PYBIND_VERSION "2.8.1")
 FetchContent_Declare(
   pybind11
   GIT_REPOSITORY https://github.com/pybind/pybind11
diff --git a/pybind_interface/cuda/CMakeLists.txt b/pybind_interface/cuda/CMakeLists.txt
index 7da45dac..4e46eb32 100644
--- a/pybind_interface/cuda/CMakeLists.txt
+++ b/pybind_interface/cuda/CMakeLists.txt
@@ -15,7 +15,7 @@ if(APPLE)
 endif()
 
 INCLUDE(../GetPybind11.cmake)
-find_package(PythonLibs 3.6 REQUIRED)
+find_package(PythonLibs 3.7 REQUIRED)
 find_package(CUDA REQUIRED)
 
 include_directories(${PYTHON_INCLUDE_DIRS} ${pybind11_SOURCE_DIR}/include)
diff --git a/pybind_interface/custatevec/CMakeLists.txt b/pybind_interface/custatevec/CMakeLists.txt
index 687ac2be..879c8928 100644
--- a/pybind_interface/custatevec/CMakeLists.txt
+++ b/pybind_interface/custatevec/CMakeLists.txt
@@ -28,7 +28,7 @@ if(APPLE)
 endif()
 
 INCLUDE(../GetPybind11.cmake)
-find_package(PythonLibs 3.6 REQUIRED)
+find_package(PythonLibs 3.7 REQUIRED)
 find_package(CUDA REQUIRED)
 
 include_directories(${pybind11_INCLUDE_DIRS})
diff --git a/pybind_interface/decide/CMakeLists.txt b/pybind_interface/decide/CMakeLists.txt
index 0808ccf6..0f16b9a6 100644
--- a/pybind_interface/decide/CMakeLists.txt
+++ b/pybind_interface/decide/CMakeLists.txt
@@ -24,7 +24,7 @@ INCLUDE(../GetPybind11.cmake)
 if(has_nvcc STREQUAL "")
   pybind11_add_module(qsim_decide decide.cpp)
 else()
-  find_package(PythonLibs 3.6 REQUIRED)
+  find_package(PythonLibs 3.7 REQUIRED)
   find_package(CUDA REQUIRED)
 
   include_directories(${PYTHON_INCLUDE_DIRS} ${pybind11_SOURCE_DIR}/include)
diff --git a/requirements.txt b/requirements.txt
index 0a95d64c..981f22a2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
 absl-py
 cirq-core
-numpy~=1.16
+numpy~=1.21
 pybind11
 typing_extensions
diff --git a/setup.py b/setup.py
index 10c7aa15..3b74d25d 100644
--- a/setup.py
+++ b/setup.py
@@ -94,7 +94,7 @@ def build_extension(self, ext):
     url="https://github.com/quantumlib/qsim",
     author="Vamsi Krishna Devabathini",
     author_email="devabathini92@gmail.com",
-    python_requires=">=3.3.0",
+    python_requires=">=3.7.0",
     install_requires=requirements,
     extras_require={
         "dev": dev_requirements,


Test patch:
diff --git a/.github/workflows/testing_wheels.yml b/.github/workflows/testing_wheels.yml
index 95271dad..7c4aa911 100644
--- a/.github/workflows/testing_wheels.yml
+++ b/.github/workflows/testing_wheels.yml
@@ -20,20 +20,21 @@ jobs:
           - os: macos-10.15
             name: mac
             cibw:
-              build: "cp36* cp37* cp38* cp39* cp310*"
+              build: "cp37* cp38* cp39* cp310*"
           - os: ubuntu-20.04
             name: manylinux2014
             cibw:
               arch: x86_64
-              build: "cp36* cp37* cp38* cp39* cp310*"
+              build: "cp37* cp38* cp39* cp310*"
               manylinux_image: manylinux2014
           - os: windows-2019
             name: win_amd64
             architecture: x64
             cibw:
-              build: "cp36-win_amd64 cp37-win_amd64 cp38-win_amd64 cp39-win_amd64 cp310-win_amd64"
+              build: "cp37-win_amd64 cp38-win_amd64 cp39-win_amd64 cp310-win_amd64"
     env:
       CIBW_BUILD: "${{ matrix.cibw.build || '*' }}"
+      CIBW_SKIP: "*musllinux*"
       CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}"
       CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_image }}"
       CIBW_BEFORE_BUILD_MACOS: "brew install libomp llvm"
@@ -51,7 +52,7 @@ jobs:
       - uses: actions/setup-python@v2
 
       - name: Install cibuildwheel and twine
-        run: python -m pip install cibuildwheel==2.0.1
+        run: python -m pip install cibuildwheel==2.2.2
 
       - name: Run C++ tests
         run: bash build_tools/test_libs.sh