diff --git a/build.py b/build.py index 8edf636f23..84670ead6d 100755 --- a/build.py +++ b/build.py @@ -169,14 +169,19 @@ def step_end(): vscode_src = os.path.join(qdk_src_dir, "vscode") jupyterlab_src = os.path.join(qdk_src_dir, "jupyterlab") +# Qiskit stopped providing binary wheels for Mac on Intel starting with version 2.4.2. Remove this bifurcation when we drop Intel Mac support +is_intel_mac = platform.system() == "Darwin" and platform.machine() == "x86_64" + QISKIT_VERSION_MATRIX = [ { "label": "qiskit>=1.3.0,<2.0.0", "requirements": ["qiskit>=1.3.0,<2.0.0"], }, { - "label": "qiskit>=2.0.0,<3.0.0", - "requirements": ["qiskit>=2.0.0,<3.0.0"], + "label": "qiskit>=2.0.0,<3.0.0" if not is_intel_mac else "qiskit==2.4.1", + "requirements": ( + ["qiskit>=2.0.0,<3.0.0"] if not is_intel_mac else ["qiskit==2.4.1"] + ), }, ] diff --git a/source/qdk_package/test_requirements.txt b/source/qdk_package/test_requirements.txt index dd5d13a093..f3938e2c28 100644 --- a/source/qdk_package/test_requirements.txt +++ b/source/qdk_package/test_requirements.txt @@ -1,5 +1,7 @@ pytest expecttest==0.3.0 pyqir>=0.12.5,<0.13 +# cryptography 49 and later dropped intel mac support. Unfix the version when we drop Intel mac support. +cryptography==48.0.1; platform_system != 'Windows' or platform_machine == 'AMD64' cirq==1.6.1; platform_system != 'Windows' or platform_machine == 'AMD64' pandas>=2.1 diff --git a/source/qdk_package/tests-integration/test_requirements.txt b/source/qdk_package/tests-integration/test_requirements.txt index f7ae43f63a..5c776d0add 100644 --- a/source/qdk_package/tests-integration/test_requirements.txt +++ b/source/qdk_package/tests-integration/test_requirements.txt @@ -1,6 +1,11 @@ pytest==9.0.3 +cryptography==48.0.1 +# cryptography 49 and later dropped intel mac support. Unfix the version when we drop Intel mac support. qirrunner==0.9.0 pyqir>=0.12.5,<0.13 +# Qiskit Aer will pull in Qiskit, and for Intel Mac we want to ensure Qiskit 2.4.1 is used, which is the last version with wheels for that platform. +# Remove the qiskit requirement when we drop Intel Mac support, as it will be pulled in by qiskit-aer. +qiskit<=2.4.1; platform_system == "Darwin" and platform_machine == "x86_64" qiskit-aer==0.17.2 qiskit_qasm3_import==0.6.0 expecttest==0.3.0