Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not run cpp tests on schedule (compat tests). #571

Merged
merged 10 commits into from
Dec 6, 2023

Conversation

vincentmr
Copy link
Contributor

@vincentmr vincentmr commented Dec 6, 2023

Before submitting

Please complete the following checklist when submitting a PR:

  • All new features must include a unit test.
    If you've fixed a bug or added code that should be tested, add a test to the
    tests directory!

  • All new functions and code must be clearly commented and documented.
    If you do make documentation changes, make sure that the docs build and
    render correctly by running make docs.

  • Ensure that the test suite passes, by running make test.

  • Add a new entry to the .github/CHANGELOG.md file, summarizing the
    change, and including a link back to the PR.

  • Ensure that code is properly formatted by running make format.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Context:
C++ tests do not depend on PennyLane and they are run in compatibility tests that are meant to test compatibility between Lightning and Pennylane. Some C++ tests triggered by compatibility workflows running on schedule fail intermittently.

Description of the Change:
Properly select tests based on event_name. Fix L-GPU trigger (workflow_run does not work).

Benefits:
Run only necessary tests. Fix plugin-matrix failures. Run L-GPU tests.

Possible Drawbacks:

Related GitHub Issues:

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a8f5f9f) 96.96% compared to head (a6e79c3) 98.71%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #571      +/-   ##
==========================================
+ Coverage   96.96%   98.71%   +1.74%     
==========================================
  Files         144      168      +24     
  Lines       18048    23081    +5033     
==========================================
+ Hits        17501    22784    +5283     
+ Misses        547      297     -250     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vincentmr vincentmr changed the title Do not run cpp tests on workflow_call (compat tests). Do not run cpp tests on schedule (compat tests). Dec 6, 2023
@vincentmr vincentmr marked this pull request as ready for review December 6, 2023 16:55
Copy link
Contributor

@AmintorDusko AmintorDusko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks!

Copy link
Member

@multiphaseCFD multiphaseCFD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks @vincentmr for the nice job!

@vincentmr vincentmr merged commit d165de1 into master Dec 6, 2023
82 checks passed
@vincentmr vincentmr deleted the ci/no_run_cpp_cron_jobs branch December 6, 2023 20:13
multiphaseCFD pushed a commit that referenced this pull request Dec 6, 2023
* Do not run cpp tests on workflow_call (compat tests).

* echo github.event_name

* workflow_call => workflow_dispatch

* Try contains(fromJSON

* Fix contains(fromJSON

* Fix contains(fromJSON

* update changelog

* Auto update version

* trigger ci

---------

Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com>
multiphaseCFD added a commit that referenced this pull request Jan 12, 2024
* add MPI support

* add samples_to_counts to measurement base class

* tidy up tests

* move tests to measurement base

* move mpi tests to measurement base class

* make format

* add python layer

* add mpi tests

* remove else

* add tensor product support

* add more tests for tensor prod obs shots

* make format

* add Hamiltonian support

* make format

* quick fix

* add hamiltonian tests

* add more py tests for tensorprod

* remove changes made in py layer

* revert more changes in py layer

* tidy up code

* update measurement base and kokkos

* make format

* refactor and add _sample_state method

* for loop sum to accumulate sum

* refactor and add _preprocess_state() method

* add more unit tests for LK backend

* Auto update version

* tidy up docstring

* remove samples() and samples2counts method

* fix typo

* quick fix

* update LQRaw object creation

* fix for multiple backends

* update format

* format fix

* format update

* make format & trigger MPI CI

* add changelog and codecov for expval(obs) method

* add shot_range coverage

* tidy up code

* add more unit tests

* fix typos

* add MPI Hamiltonian tests for shots

* add HamBase tests for applyInPlaceShots

* update based on comments

* add more unit tests

* move tests for non-distributed backends to base

* move all unit tests into the base class

* move getTotalNumQubits to base and tidy up code

* tidy up code

* revert changes in Test_MeasurementLQ

* initial commit

* tidy up code

* Auto update version

* add var obs tests

* add tests for prob for all backend and var for MPI

* quick fix

* add unit tests for counts & samples obs

* add more sample() & counts() unit tests

* add sample counts tests for mpi backend

* make format

* Trigger MPI CI

* tidy up code

* add changelogs and tidy up unit tests

* update docstring

* fix typo

* update return type of counts & tidy up code

* Auto update version

* update brief of probs(obs)

* update based on comments

* fix typo

* initial commit

* update unit tests

* add unit tests

* add changelog

* fix typo

* Auto update version

* fix typo

* debug ci actions

* set -x

* revert serial tests

* fix typo

* quick fix for ci failures

* unit tests fix

* test

* update unit tests

* fix unit tests

* make format

* quick fix reset unit test margin

* fix for mpi unit tests

* add sub-system prob with noise

* quick fix

* update changelog

* quick fix for mpi unit tests

* quick fix

* quick test for LGPU backend

* unit tests debug

* remove commented lines

* quick fix

* quick fix for mpi unit tests

* update ci

* unify unit tests for all serial backends

* tidy up code

* Add arbitary eigenvalues support

* remove redefined prob methods

* add hermitian support

* Auto update version

* Refactor obs base and safer LQRaw call for  measurement shots (#570)

* initial commit

* Auto update version

* add changelog

* fix typo

* Trigger MGPU CI

* quick fix namespace

* fix unit tests

* make format

* add more unit tests for better codecov

* update docstring

* fix typo

---------

Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com>

* Do not run cpp tests on schedule (compat tests). (#571)

* Do not run cpp tests on workflow_call (compat tests).

* echo github.event_name

* workflow_call => workflow_dispatch

* Try contains(fromJSON

* Fix contains(fromJSON

* Fix contains(fromJSON

* update changelog

* Auto update version

* trigger ci

---------

Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com>

* Auto update version

* add Hermitian obs test

* cmake script for cray system

* Auto update version

* Auto update version

* build lapacke from scratch

* add conditional compilation for hermitian diagonal

* static->shared

* test msvc lapacke build

* test linux

* remove ninja in ci build

* update lib file dir in linux ci

* quick fix

* quick test

* quick test

* update cmake

* test msvc

* fix windows ci syntax error

* update gfortran install

* quick fix

* quick fix

* another tests

* add path

* windows yml debug

* windows debug

* win32 test

* Auto update version

* update lapack install with msys2

* update lapack install with msys2

* win32 test

* fix ci error

* add msys2 to path

* install lapack with

* Auto update version

* quick fix

* add lapacke option vcpkg ci

* quick fix yml windows

* remove local build for win32

* try to enbale lapacke via vcpkg

* use api from lapack instead of lapacke

* add windows tests for kokkos

* change win32 install dir

* test

* debug kokkos win32 tests lapack

* set CMAKE_TOOLCHAIN_FILE in cmakelist

* user has to ensure `CMAKE_TOOLCHAIN_FILE` setting

* Auto update version

* use prebuilt lapack for linux

* quick fix

* Auto update version

* tidy up code

* convert kokkos::complex to std::complex for lapack

* debug tests_linux

* set x

* set larger margin for hermitian shot measurement

* make format

* use more shots for unit tests

* trigger mgpu CI

* add var shot support

* add changelog & update Readme for LAPACK install

* update README.srt

* quick fix

* tidy up code

* ensure matrix passed to HermitianObs is Hermitian

* add more tests and fix unit tests

* quick fix

* use relative margin for stochastic calculation

* set margin as 20%

* quick fix

* Less changes Herm check to applyInShot [skip CI]

* make format [skip CI]

* [skip ci]

* update README [skip ci]

* fix readthedocs & remove set x in ci

* [skip ci]

* Trigger CI

* fix tidy and debug two backends CI c++

* add ci tests without lapack

* quick fix

* revert readme changes

* update readthedocs.yml [skip ci]

* put heev to anoy namespace

* remove Hermitian Check in obs construction

* set readthedocs python as 3.11 [skip ci]

* update readthedocs [skip ci]

* refactor and move herm decompose from Util.hpp

* add unit tests for herm decompose

* Revert "revert readme changes"

This reverts commit 96620c1.

* use v0.34.0 for python tests

* adjoint->parameter shift qubit unitary check

* test_qubit_unitary adjoint -> parameter-shift

* tidy up code

* revert requirement-dev

* Use ps as unitary adjoint bench result

* make format

* set pennylane as 0.34 revert to adj unitarty test

* pennylane 0.32->0.34

* set version as 0.35

* move 569 to dev0.35

* larger margin and add Hermitian check

* revert changes in py unit tests

* fix based on comments

* fix based on comments

* quick fix for windows ci

* add CMAKE_TOOLCHAIN_FILE for win test

* cache lapack

* quick fix for lapack cache

* revert lapack cache in win ci

* revert to 30 minutes for win tests

* set time as 45 mins for win tests

* make format

* remove no need vector clear

* Trigger CI

* change openblas test name

* make format

* Trigger CI

* update catch2 version from 2.13.9-> 3.5.1

* 3.5->2.13.10

* update linux CI

* revert constexpr to const

* revert 6692b13

* const->constexpr & remove some vector clear

* rename cov upload

* remove cov files combination for python tests

* revert the previous commit

* fix typo

* quick fix

* add Hermitian-Hamiltonian tests

---------

Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Vincent Michaud-Rioux <vincent.michaud-rioux@xanadu.ai>
Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com>
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.

3 participants