Skip to content

fix: add labs to documentation testing workflow#9560

Open
andrijapau wants to merge 27 commits into
mainfrom
fix/labs-doctest
Open

fix: add labs to documentation testing workflow#9560
andrijapau wants to merge 27 commits into
mainfrom
fix/labs-doctest

Conversation

@andrijapau
Copy link
Copy Markdown
Contributor

@andrijapau andrijapau commented Jun 2, 2026

Context:

Just because docstrings are in labs doesn't mean they shouldn't be CI / CD tested.

[sc-121352]

@andrijapau andrijapau added the WIP 🚧 Work-in-progress label Jun 2, 2026
@andrijapau
Copy link
Copy Markdown
Contributor Author

I feel bad @dwierichs , you write these nice docstrings (#9539) and they aren't even being tested. 😢

I've opened this as a WIP pr to chip away at whenever I have some spare time. Feel free to help out!

@PennyLaneAI PennyLaneAI deleted a comment from github-actions Bot Jun 2, 2026
Comment thread pennylane/labs/dla/recursive_cartan_decomp.py Outdated
>>> op = batched_pauli_decompose(mat)
>>> op
0.25 * X(1) + 0.4 * Z(1)
0.25 * X(0) + 0.4 * (X(1) @ Z(0))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

previous was wrong (look at hamiltonian)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Without this, there were import errors

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.45%. Comparing base (c798d0d) to head (924c063).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9560   +/-   ##
=======================================
  Coverage   99.45%   99.45%           
=======================================
  Files         614      614           
  Lines       67863    67865    +2     
=======================================
+ Hits        67490    67492    +2     
  Misses        373      373           

☔ 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.

>>> print(qre.estimate(sos_state))
--- Resources: ---
Total wires: 32
Total wires: 51
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Jaybsoni , flagging this in case it's unexpected

3: ─────────────╰⊕─╰X─┤ State
2: ──X─╭●──X──────────┤ State
4: ────╰X─╭●─╭●───────┤ State
1: ──X────├●─│────────┤ State
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is this additional X expected? 😓

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@KetpuntoG can you confirm? 🙃

Comment thread pennylane/labs/templates/trotter_fragmented.py Outdated
@andrijapau andrijapau requested review from Qottmann and dwierichs June 3, 2026 18:22
@andrijapau andrijapau added review-ready 👌 PRs which are ready for review by someone from the core team. and removed WIP 🚧 Work-in-progress labels Jun 3, 2026
Copy link
Copy Markdown
Contributor

@dwierichs dwierichs left a comment

Choose a reason for hiding this comment

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

All looks good/easy to conclude to me :) Will approve after last things are resolved 👍

Comment thread pennylane/labs/estimator_beta/wires_manager/wire_counting.py
3: ─────────────╰⊕─╰X─┤ State
2: ──X─╭●──X──────────┤ State
4: ────╰X─╭●─╭●───────┤ State
1: ──X────├●─│────────┤ State
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@KetpuntoG can you confirm? 🙃

Comment thread pennylane/labs/templates/trotter_fragmented.py Outdated
Comment thread pennylane/labs/templates/trotter_fragmented.py Outdated
Comment thread pennylane/labs/transforms/decomp_selectpaulirot_phase_gradient.py Outdated
Comment thread pyproject.toml
@andrijapau andrijapau requested a review from dwierichs June 3, 2026 20:42
Copy link
Copy Markdown
Contributor

@dwierichs dwierichs 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-ready 👌 PRs which are ready for review by someone from the core team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants