quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.24k stars 1.01k forks source link

Update CI MacOS to fix notebook test error #6366

Closed smburdick closed 10 months ago

smburdick commented 10 months ago

Description

Address issue #6336 for macOS.

Testing

./check/pytest-changed-files -n auto --ignore=cirq-core/cirq/contrib --enable-slow-tests --verbose

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6ea5ae1) 97.80% compared to head (77ecc83) 97.80%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6366 +/- ## ========================================== - Coverage 97.80% 97.80% -0.01% ========================================== Files 1111 1111 Lines 96878 96878 ========================================== - Hits 94756 94755 -1 - Misses 2122 2123 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

smburdick commented 10 months ago

In failed changed files test:

---------------------------------------------------------------------------
Exception encountered at "In [2]":
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[2], line 5
      2 import networkx as nx
      4 import cirq
----> 5 import quimb
      6 import quimb.tensor as qtn
      7 from cirq.contrib.svg import SVGCircuit

ModuleNotFoundError: No module named 'quimb'

Let's add the quimb module to the requirements (or include Cirq/cirq-core/cirq/contrib/requirements.txt)

smburdick commented 10 months ago

The checks passed with the slow mark removed: https://github.com/quantumlib/Cirq/actions/runs/7064136655/job/19231563262?pr=6366

I will restore the slow mark and push.

smburdick commented 10 months ago
=========================== short test summary info ============================
FAILED dev_tools/notebooks/notebook_test.py::test_notebooks_against_cirq_head[/home/runner/work/Cirq/Cirq/examples/stabilizer_code.ipynb] - Failed: Notebook failure: stabilizer_code.ipynb, please see out/examples/stabilizer_code.out.ipynb for the output notebook (in Github Actions, you can download it from the workflow artifact 'notebook-outputs')
=================== 1 failed, 55 passed in 502.08s (0:08:22) ===================

I downloaded the artifacts, but don't see that file in the zip.

smburdick commented 10 months ago

Retriggered the checks and that problem went away.