Skip to content

docs: Fix tket README introductory example#1463

Merged
maximilianruesch merged 4 commits intomainfrom
mr/docs/update-tket-readme
Mar 24, 2026
Merged

docs: Fix tket README introductory example#1463
maximilianruesch merged 4 commits intomainfrom
mr/docs/update-tket-readme

Conversation

@maximilianruesch
Copy link
Copy Markdown
Contributor

There were a couple of more issues than just the json module missing. This variant has been tried and tested locally. Perhaps we should add some tests for this? I don't know whether we can.

Closes #1362

@maximilianruesch maximilianruesch requested a review from a team as a code owner March 24, 2026 10:25
@maximilianruesch maximilianruesch requested a review from doug-q March 24, 2026 10:25
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.98%. Comparing base (ae0016c) to head (bf8d5a4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1463   +/-   ##
=======================================
  Coverage   79.98%   79.98%           
=======================================
  Files         155      155           
  Lines       20204    20204           
  Branches    19213    19213           
=======================================
  Hits        16160    16160           
  Misses       3090     3090           
  Partials      954      954           
Flag Coverage Δ
python 93.00% <ø> (ø)
qis-compiler 91.66% <ø> (ø)
rust 79.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@maximilianruesch maximilianruesch requested review from aborgna-q and removed request for doug-q March 24, 2026 10:36
@aborgna-q
Copy link
Copy Markdown
Collaborator

There's a suggestion for testing the README here: https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html#include-items-only-when-collecting-doctests

We can add this to lib.rs.

#[doc = include_str!("../README.md")]
#[cfg(doctest)]
pub struct ReadmeDoctests;

@maximilianruesch
Copy link
Copy Markdown
Contributor Author

Even uncovered a subtle bug in the readme code 👍

@maximilianruesch maximilianruesch added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit fa2ce9b Mar 24, 2026
24 checks passed
@maximilianruesch maximilianruesch deleted the mr/docs/update-tket-readme branch March 24, 2026 12:07
@hugrbot hugrbot mentioned this pull request Mar 23, 2026
github-merge-queue bot pushed a commit that referenced this pull request Apr 2, 2026
## 🤖 New release

* `tket`: 0.17.0 -> 0.18.0 (✓ API compatible changes)
* `tket-qsystem`: 0.23.0 -> 0.24.0 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

## `tket`

<blockquote>

##
[0.18.0](tket-v0.17.0...tket-v0.18.0)
- 2026-04-02

### Bug Fixes

- *(pytket decoder)* Panic on repeated bit registers in pytket decoded
output ([#1445](#1445))
- pytket encoder drops order edges to the output node
([#1466](#1466))

### Documentation

- Fix tket README introductory example
([#1463](#1463))

### New Features

- [**breaking**] Use raw Hugrs in pytket encoding/decoding API
([#1418](#1418))
- [**breaking**] Remove unused `lower_to_pytket` pass
([#1431](#1431))
- [**breaking**] Replace CircuitHash with hugr's implementation
([#1420](#1420))
- [**breaking**] Update MSRV to rust 1.91
([#1446](#1446))
- [**breaking**] Update to hugr 0.26.0
([#1448](#1448))
- [**breaking**] Follow pass scopes in composable passes
([#1429](#1429))
- Implemented `post_opdef` for `RotationOp` for constant folding
([#1468](#1468))
- [**breaking**] Reorganize `tket::passes` and add `hugr_passes`
re-exports ([#1472](#1472))
- [**breaking**] Bump `hugr` dependency to 0.27.0
([#1488](#1488))
- Move hugr-passes implementations to tket::passes
([#1487](#1487))
- Pass scopes in python API, update to hugr-py 0.16
([#1464](#1464))

### Refactor

- *(llvm)* use llvm.is.fpclass for from_halfturns
([#1457](#1457))

### Testing

- Fixed signatures when decoding pytket circuits
([#1405](#1405))
</blockquote>

## `tket-qsystem`

<blockquote>

##
[0.24.0](tket-qsystem-v0.23.0...tket-qsystem-v0.24.0)
- 2026-04-02

### Bug Fixes

- pytket encoder drops order edges to the output node
([#1466](#1466))
- Constant Folding with PassScope::Global should act globally, not just
beneath the entrypoint
([#1470](#1470))

### New Features

- [**breaking**] Use raw Hugrs in pytket encoding/decoding API
([#1418](#1418))
- Add qsystem.rz pytket decoder
([#1432](#1432))
- [**breaking**] Update MSRV to rust 1.91
([#1446](#1446))
- [**breaking**] Update to hugr 0.26.0
([#1448](#1448))
- [**breaking**] Follow pass scopes in composable passes
([#1429](#1429))
- [**breaking**] Reorganize `tket::passes` and add `hugr_passes`
re-exports ([#1472](#1472))
- Move hugr-passes implementations to tket::passes
([#1487](#1487))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

---------

Co-authored-by: Agustín Borgna <[email protected]>
@hugrbot hugrbot mentioned this pull request Apr 7, 2026
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.

Fix "Using TKET" example in README

2 participants