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

Fix unit test for applyControlledPhaseShift #1083

Merged
merged 7 commits into from
Mar 11, 2025
Merged

Conversation

jzaia18
Copy link
Contributor

@jzaia18 jzaia18 commented Mar 7, 2025

Context:
The unit test testApplyControlledPhaseShift in pennylane_lightning/core/src/simulators/lightning_qubit/gates/tests/Test_GateImplementations_Param.cpp sets up 2 unit tests but only actually executes 1 of them.

Description of the Change:
Fix testApplyControlledPhaseShift to run all unit tests that it constructs.

Benefits:

Possible Drawbacks:

Related GitHub Issues:

@jzaia18 jzaia18 added the draft Indicates that the PR is still in draft mode, but needs CIs. label Mar 7, 2025
Copy link
Contributor

github-actions bot commented Mar 7, 2025

Hello. You may have forgotten to update the changelog!
Please edit .github/CHANGELOG.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Copy link

codecov bot commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.60%. Comparing base (79328b1) to head (765aa42).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1083      +/-   ##
==========================================
- Coverage   97.94%   94.60%   -3.34%     
==========================================
  Files         233      177      -56     
  Lines       40370    27606   -12764     
==========================================
- Hits        39539    26118   -13421     
- Misses        831     1488     +657     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jzaia18 jzaia18 changed the title [WIP] Fix unit test for applyControlledPhaseShift Fix unit test for applyControlledPhaseShift Mar 7, 2025

Choose a reason for hiding this comment

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

PR Overview

This PR fixes the issue where only one unit test was executed in testApplyControlledPhaseShift.

  • Updated the changelog to document the bug fix.
  • Incremented the version number from "0.41.0-dev30" to "0.41.0-dev31" to include the fix.

Reviewed Changes

File Description
.github/CHANGELOG.md Added changelog entry for the fix of skipped unit tests.
pennylane_lightning/core/_version.py Incremented the version to reflect the new bug fix.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

@jzaia18 jzaia18 added bug-fix Indicates this fixes a known bug and removed draft Indicates that the PR is still in draft mode, but needs CIs. labels Mar 7, 2025
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.

Nice job!

Copy link
Contributor

@josephleekl josephleekl left a comment

Choose a reason for hiding this comment

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

Great find @jzaia18 ! Just a small comment, happy to approve once updated! (and tests all pass)

Copy link
Contributor

@josephleekl josephleekl left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @jzaia18 ! 🥳

@jzaia18 jzaia18 merged commit b16bfb1 into master Mar 11, 2025
69 of 70 checks passed
@jzaia18 jzaia18 deleted the fix/fix-missing-unit-test branch March 11, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Indicates this fixes a known bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants