2.7: Migrate swapup_linear_qubit, swapup_linear_register, swapup_linear to the modifier API
I maintainer di solito rispondono entro 2 giorni
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Goal
Migrate swap networks to the public control/dagger API. Target swapup_linear_qubit, swapup_linear_register, swapup_linear, including their existing inverse/controlled variants, nested generated circuits and affected callers.
Part of Functions: Control and dagger migration plan — item 2.7. Milestone: Modifier Refactor.
Dependencies
- 1.6 — Swap and phase primitives: #166 (phase/cphase portion); swap work is in PR #138, which has no linked closing issue. Verify the swap capabilities needed here independently.
Plan dependency details: 1.6. 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 swap-network direction, register positions and optimized decomposition. A dagger must reverse operation order, not simply repeat the same traversal.
Implementation guidance
Start by inspecting:
guppyalgos/primitives/subroutines/swap/swapup.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.
- Lingua principale
- Python
- Stelle
- 12
- Fork
- 1
- Merge medio
- 3g 1h
- PR unite (30g)
- 19
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Quantinuum/guppyalgos
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Quantinuum/guppyalgos#233 ·
I maintainer di solito rispondono entro 2 giorni
-
Add lint rules for importsForse già presa @Walden-Killick l’ha presa 11 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Quantinuum/guppyalgos#224 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Quantinuum/guppyalgos#239 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Add unitary modifiers to `Ladder` protocol and implementorsForse già presa @GBoydQ l’ha presa 4 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
Quantinuum/guppyalgos#237 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 35/100
Quantinuum/guppyalgos#223 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di Quantinuum/guppyalgos
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
521xueweihan/HelloGitHub#4729 ·
-
auto-reported bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
cliproxy-quota: a tab around a credential email skips own-accounts and paced-accounts matchingApertaneeds-triage type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
pollen-robotics/reachy_mini_conversation_app#631 ·
I maintainer di solito rispondono entro 7 giorni
-
stix-atlas.json: the same relationship id is used for several different mitigates relationshipsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100