quantumlib / qsim

Schrödinger and Schrödinger-Feynman simulators for quantum circuits.
Apache License 2.0
454 stars 151 forks source link

Update version to 0.19.0 #644

Closed 95-martin-orion closed 12 months ago

95-martin-orion commented 12 months ago

This minor version adds support for the "basic" version of qsim on Apple Silicon (#643).

95-martin-orion commented 12 months ago

It seems like something changed between when #643 was merged and this PR. This could be an actual change or simply a flake due to different Github Actions runners - details are below. The main difference I see is python@3.11 in this PR's logs, which appears to have failed to link.

Logs from PR #643 ``` Building cp37-macosx_x86_64 wheel CPython 3.7 macOS x86_64 Installing Python cp37... ✓ 24.43s Setting up build environment... ✓ 5.90s Installing build tools... ✓ 2.82s Running before_build... + brew install libomp llvm && brew link --overwrite python@3.11 && brew link --force libomp Warning: libomp 17.0.1 is already installed and up-to-date. To reinstall 17.0.1, run: brew reinstall libomp ==> Downloading https://ghcr.io/v2/homebrew/core/llvm/manifests/16.0.6 ==> Fetching dependencies for llvm: z3 ==> Downloading https://ghcr.io/v2/homebrew/core/z3/manifests/4.12.2 ==> Fetching z3 ==> Downloading https://ghcr.io/v2/homebrew/core/z3/blobs/sha256:80ce63d42c4377b4e4d30299bbb9a99f3adfd2d8[78](https://github.com/quantumlib/qsim/actions/runs/7022643536/job/19108288226#step:7:80)936ad6717e63bd73fd28d9 ==> Fetching llvm ==> Downloading https://ghcr.io/v2/homebrew/core/llvm/blobs/sha256:ab4d69c11183a536f52dfd4eb8c14f3fc047b8433b03eff99cea76f778e61305 ==> Installing dependencies for llvm: z3 ==> Installing llvm dependency: z3 ==> Downloading https://ghcr.io/v2/homebrew/core/z3/manifests/4.12.2 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/49561ecf82b693a3dd67cdef0b355d88ead97782404c68899[79](https://github.com/quantumlib/qsim/actions/runs/7022643536/job/19108288226#step:7:81)b70c308fee928--z3-4.12.2.bottle_manifest.json ==> Pouring z3--4.12.2.monterey.bottle.tar.gz 🍺 /usr/local/Cellar/z3/4.12.2: 118 files, 31.4MB ==> Installing llvm ==> Pouring llvm--16.0.6.monterey.bottle.tar.gz {...} ```
Logs from this PR ``` Building cp37-macosx_x86_64 wheel CPython 3.7 macOS x86_64 Installing Python cp37... ✓ 63.24s Setting up build environment... ✓ 124.86s Installing build tools... ✓ 16.46s Running before_build... + brew install libomp llvm && brew link --overwrite python@3.11 && brew link --force libomp Warning: libomp 17.0.4 is already installed and up-to-date. To reinstall 17.0.4, run: brew reinstall libomp ==> Downloading https://ghcr.io/v2/homebrew/core/llvm/manifests/17.0.4 ==> Fetching dependencies for llvm: python@3.11 and z3 ==> Downloading https://ghcr.io/v2/homebrew/core/python/3.11/manifests/3.11.6_1 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/481941c47c71dfeb6fba3057ead9b0bd21f7ca514b815bd8dde7cbeff257b362--python@3.11-3.11.6_1.bottle_manifest.json ==> Fetching python@3.11 ==> Downloading https://ghcr.io/v2/homebrew/core/python/3.11/blobs/sha256:c7407b1789917854565df3df7319af7e24425485d190ec97bc634215f96a453d Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/3819662d9ce3a30d7c8b799937ba1337ac615f82f2bda0ec7e37f86c9e15d555--python@3.11--3.11.6_1.monterey.bottle.tar.gz ==> Downloading https://ghcr.io/v2/homebrew/core/z3/manifests/4.12.2-1 ==> Fetching z3 ==> Downloading https://ghcr.io/v2/homebrew/core/z3/blobs/sha256:3c9f8a788f325077119a4be747f7462c2804fed4143a82e8cf3[58](https://github.com/quantumlib/qsim/actions/runs/7035007729/job/19144381911?pr=644#step:7:59)47ba7803d03 ==> Fetching llvm ==> Downloading https://ghcr.io/v2/homebrew/core/llvm/blobs/sha256:fc[60](https://github.com/quantumlib/qsim/actions/runs/7035007729/job/19144381911?pr=644#step:7:61)eaf8633dc88c39fe39d4050da40428875[79](https://github.com/quantumlib/qsim/actions/runs/7035007729/job/19144381911?pr=644#step:7:81)f4eaf257d2bff7576f0e63624 ==> Installing dependencies for llvm: python@3.11 and z3 ==> Installing llvm dependency: python@3.11 ==> Downloading https://ghcr.io/v2/homebrew/core/python/3.11/manifests/3.11.6_1 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/481941c47c71dfeb6fba3057ead9b0bd21f7ca514b815bd8dde7cbeff257b362--python@3.11-3.11.6_1.bottle_manifest.json ==> Pouring python@3.11--3.11.6_1.monterey.bottle.tar.gz Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/2to3 Target /usr/local/bin/2to3 already exists. You may want to remove it: rm '/usr/local/bin/2to3' To force the link and overwrite all conflicting files: brew link --overwrite python@3.11 To list all files that would be deleted: brew link --overwrite --dry-run python@3.11 Possible conflicting files are: /usr/local/bin/2to3 -> /Library/Frameworks/Python.framework/Versions/3.7/bin/2to3 /usr/local/bin/2to3-3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/2to3-3.11 /usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.7/bin/idle3 /usr/local/bin/idle3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/idle3.11 /usr/local/bin/pydoc3 -> /Library/Frameworks/Python.framework/Versions/3.7/bin/pydoc3 /usr/local/bin/pydoc3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/pydoc3.11 /usr/local/bin/python3 -> /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 /usr/local/bin/python3-config -> /Library/Frameworks/Python.framework/Versions/3.7/bin/python3-config /usr/local/bin/python3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 /usr/local/bin/python3.11-config -> /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11-config ```
95-martin-orion commented 12 months ago

CC @basnijholt to investigate.

basnijholt commented 12 months ago

My suspicion is that this is intermittent. Could you try restarting the failed CI job?

If this doesn't work, instead of relinking Python, we could also just add the libomp symlinks, and skip the Python relinking.

95-martin-orion commented 12 months ago

My suspicion is that this is intermittent. Could you try restarting the failed CI job?

This appears to have worked. I'd like to eliminate the flake if possible, but we can go ahead with the release for now.

basnijholt commented 11 months ago

@95-martin-orion for some reason the MacOS ARM64 wheels aren't uploaded (https://pypi.org/project/qsimcirq/#files).

95-martin-orion commented 11 months ago

@95-martin-orion for some reason the MacOS ARM64 wheels aren't uploaded (https://pypi.org/project/qsimcirq/#files).

Looking at the logs, it seems like the macos-13-large run also built x86_64 wheels. It might be necessary to specify CIBW_ARCHS_MACOS as demonstrated in this example from the cibuildwheel docs.