4.2: Migrate cnx_ladder_logdepth to the modifier API
Maintainers usually reply within 2 days
@GBoydQ is already working on this.
Since Nov 11, 2026.
Assessment
This issue has not been assessed yet.
Description
Goal
Migrate log-depth cnx ladder to the public control/dagger API. Target cnx_ladder_logdepth, including their existing inverse/controlled variants, nested generated circuits and affected callers.
Part of Functions: Control and dagger migration plan — item 4.2. Milestone: Modifier Refactor.
Dependencies
- 1.7 — Ladder primitives: migration plan item 1.7 (no dedicated issue identified)
- 3.2 — CNX helpers and CCA implementations: #181
Plan dependency details: 1.7, 3.2. Earlier-layer prerequisites must supply the capabilities this package uses. A linked issue or PR alone does not establish that its implementation is ready; check merged behavior and recorded blockers first.
Expected behavior
Callers use the forward public operation normally, with dagger for its adjoint, with control(external_controls) for additional controls, and both modifiers for controlled dagger wherever those capabilities are valid. Preserve natural signatures, register ownership, optimized decompositions and coherent relative phases.
Preserve log-depth ladder structure, index bounds and workspace restoration. Check small-width boundaries and existing multi-control regressions.
Implementation guidance
Start by inspecting:
guppyalgos/primitives/subroutines/ladders/cnx_ladder.py
- Read the repository instructions, related tests and examples. Search all target names across
guppyalgos,tests,examplesanddocs; recheck paths and renamed APIs on the implementation branch. - Inventory domains, variants, loops, measurements and callbacks. Prefer automatic modifier generation where supported. Preserve useful optimized kernels privately; supply validated custom paths where generation is unavailable.
- Reuse
MultiCntrlFunctionorMultiCntrlFunctionParamswhen appropriate, with an exact CNX kernel. Preserve and restore packed targets and borrowed controls. Avoid duplicated conjunction logic and dependency cycles. - Migrate callers, imports/exports, callback annotations, factory return types, tests and documentation together. Replace explicit inverse/control variants with public modifiers where their contracts match; preserve meaningful operations and promised cleanup.
Acceptance criteria
- All valid advertised public modes compile; unsupported compiler or semantic combinations have explicit recorded blockers.
- Existing circuit behavior, relative phases, input domains and register ownership are preserved.
- Affected callers and generated circuits use public modifiers, with no unintended private-kernel bypass or stale inverse/control alias.
- Existing correctness coverage runs through the public API.
- Small custom modifier paths use
assert_unitary_modifierswith an independent expected unitary and its adjoint. Round trips alone are insufficient. - Custom control covers active, inactive and coherent branches with a single overall phase alignment; custom multi-control/packing paths have representative integration coverage and restore workspace.
- Promised-input or measurement routines have specialized domain/coherence/cleanup tests where applicable.
- Changes to gate count, depth or ancilla use are explained; unresolved contracts are documented.
Validation
Run uv run pytest <affected test paths> -q for the relevant modules and consumers, then prek. Execute affected notebooks sequentially and build documentation if changed. Record the exact commands and results in the PR.
Use existing shared testing helpers from public main. Do not duplicate compiler coverage for wholly generated modifiers or repeat the full adapter suite for every circuit. Public struct modifier migration and classical/container utilities remain outside this package, except for required circuit-caller updates.
- Dominant language
- Python
- Stars
- 12
- Forks
- 1
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 19
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Quantinuum/guppyalgos
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Quantinuum/guppyalgos#233 ·
Maintainers usually reply within 2 days
-
Add lint rules for importsPossibly taken @Walden-Killick claimed this 11 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Quantinuum/guppyalgos#224 ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Quantinuum/guppyalgos#239 · 1 comment ·
Maintainers usually reply within 2 days
-
Add unitary modifiers to `Ladder` protocol and implementorsPossibly taken @GBoydQ claimed this 4 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
Quantinuum/guppyalgos#237 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 Half a day Newbie friendliness 35/100
Quantinuum/guppyalgos#223 ·
Maintainers usually reply within 2 days
All issues in Quantinuum/guppyalgos
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day