Skip to content

Fix failing CI tests for PySCF RHF root and Cirq 1.8.0.dev changes - #503

Merged
dstrain115 merged 1 commit into
quantumlib:mainfrom
eliottrosenberg:fix_ci_tests
Nov 8, 2026
Merged

dstrain115 merged 1 commit into
quantumlib:mainfrom
eliottrosenberg:fix_ci_tests

Conversation

@eliottrosenberg

Copy link
Copy Markdown
Contributor

Fixes three test failures in CI across previous, current, and next:

  1. recirq/qcqmc/hamiltonian_test.py::test_pyscf_h4_consistent_with_file:
    • For degenerate square $\text{H}_4$, scf.RHF() in build_hamiltonian_from_pyscf() can converge to either of two RHF roots (-1.77924327 or -1.70148936) depending on platform/BLAS (see QCQMC Hamiltonian test fails in NumPy 2 due to difference in PySCF output on MacOS arm64 #396). Previously the fallback check only allowed macOS (sys.platform == "darwin"), whereas Linux CI now also converges to -1.70148936. Updated the fallback to assert that e_hf matches the second known RHF root (-1.7014893632799266) to 5 decimal places.
  2. recirq/serialization_utils_test.py::test_bits_roundtrip:
    • Accepts both compact single-line JSON (the new default in Cirq $\ge 1.8$ after quantumlib/Cirq#8475) and multi-line indent=2 JSON (Cirq $\le 1.7$).
  3. recirq/random_circuit_sampling/rcs_experiment_test.py::test_rcs_multi_depth_regression:
    • Checks the expected deterministic XEB benchmark values corresponding to np.random.Generator when simulator._prng is a Generator (after quantumlib/Cirq#8480) and np.random.RandomState on earlier Cirq versions.

@dstrain115
dstrain115 added this pull request to the merge queue Nov 8, 2026
Merged via the queue into quantumlib:main with commit c081606 Nov 8, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants