From c5f6a10f91ed781eba2a5cf327930bcfb1b8ff24 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Fri, 15 May 2026 19:00:10 -0700 Subject: [PATCH 1/3] Temporarily activate ci-daily for pull-requests For instant workflow verification. Revert this commit before submitting the PR. --- .github/workflows/ci-daily.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-daily.yml b/.github/workflows/ci-daily.yml index af50bca1e38..22c21cdd733 100644 --- a/.github/workflows/ci-daily.yml +++ b/.github/workflows/ci-daily.yml @@ -4,6 +4,10 @@ on: schedule: # Checks out main by default. - cron: '0 0 * * *' + # FIXME - remove this before PR submission + pull_request: + branches: + - main # Allow manual invocation. workflow_dispatch: From 1ee30c0de70977a561d991e4715293decc307d07 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Mon, 18 May 2026 11:15:10 -0700 Subject: [PATCH 2/3] Add noise to state vector to simulate failed sub_state factorization --- cirq-core/cirq/linalg/transformations_test.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cirq-core/cirq/linalg/transformations_test.py b/cirq-core/cirq/linalg/transformations_test.py index acf9ed8bf0a..f9e1fca1d76 100644 --- a/cirq-core/cirq/linalg/transformations_test.py +++ b/cirq-core/cirq/linalg/transformations_test.py @@ -390,25 +390,28 @@ def test_sub_state_vector() -> None: ) # Reject factoring for very tight tolerance. + imperfect_state = state * np.random.normal(1.0, 1e-6, state.shape) assert ( - cirq.sub_state_vector(state, [0, 1], default=_DEFAULT_ARRAY, atol=1e-16) is _DEFAULT_ARRAY + cirq.sub_state_vector(imperfect_state, [0, 1], default=_DEFAULT_ARRAY, atol=1e-16) + is _DEFAULT_ARRAY ) assert ( - cirq.sub_state_vector(state, [2, 3, 4], default=_DEFAULT_ARRAY, atol=1e-16) + cirq.sub_state_vector(imperfect_state, [2, 3, 4], default=_DEFAULT_ARRAY, atol=1e-16) is _DEFAULT_ARRAY ) assert ( - cirq.sub_state_vector(state, [5, 6, 7, 8], default=_DEFAULT_ARRAY, atol=1e-16) + cirq.sub_state_vector(imperfect_state, [5, 6, 7, 8], default=_DEFAULT_ARRAY, atol=1e-16) is _DEFAULT_ARRAY ) # Ensure None can be passed as the `default` argument - assert cirq.sub_state_vector(state, [0, 1], default=None, atol=1e-16) is None + assert cirq.sub_state_vector(imperfect_state, [0, 1], default=None, atol=1e-16) is None # Permit invalid factoring for loose tolerance. for q1 in range(9): assert ( - cirq.sub_state_vector(state, [q1], default=_DEFAULT_ARRAY, atol=1) is not _DEFAULT_ARRAY + cirq.sub_state_vector(imperfect_state, [q1], default=_DEFAULT_ARRAY, atol=1) + is not _DEFAULT_ARRAY ) From 38de272ea65132c657d9f0181877da07afa2f20a Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Mon, 18 May 2026 11:50:54 -0700 Subject: [PATCH 3/3] Revert "Temporarily activate ci-daily for pull-requests" This reverts commit c5f6a10f91ed781eba2a5cf327930bcfb1b8ff24. --- .github/workflows/ci-daily.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci-daily.yml b/.github/workflows/ci-daily.yml index 22c21cdd733..af50bca1e38 100644 --- a/.github/workflows/ci-daily.yml +++ b/.github/workflows/ci-daily.yml @@ -4,10 +4,6 @@ on: schedule: # Checks out main by default. - cron: '0 0 * * *' - # FIXME - remove this before PR submission - pull_request: - branches: - - main # Allow manual invocation. workflow_dispatch: