Add periodic boundary support to banded sparse-access oracles
I maintainer di solito rispondono entro 8 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- backend, quantum-computing
Direzione di ricerca
Start with python/cudaq_algorithms/sparse/_banded.py and the existing banded oracle tests; trace how locations, values, inverses, and normalization are defined. Implement and test the periodic mode against independently assembled quantized circulant matrices, including alias and small-dimension cases. Done means the stated oracle, unitarity, QSVT solve, documentation, and runnable example criteria pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
banded_oracles currently clips entries that cross the matrix boundary, although its location oracle already computes shifts modulo the register dimension. Add an opt-in periodic mode so constant-coefficient circulant stencils can use SparseOracleEncoding and QSVT through arithmetic oracles, without a per-entry QROM table.
A motivating example is the periodic diffusion-reaction operator
A = (2 + mass) I - S - S.T, where S is a cyclic shift, N = 2**n, and mass > 0 makes the system invertible.
Proposed API
from cudaq_algorithms.sparse import SparseOracleEncoding, banded_oracles
n = 3
mass = 4.0 / 9.0
oracles = banded_oracles(
offsets=[-1, 0, 1],
band_values=[-1.0, 2.0 + mass, -1.0],
num_system=n,
value_bits=8,
boundary="periodic",
)
encoding = SparseOracleEncoding(oracles, num_system=n)
Preserve the current clipped behavior as the default, for example boundary="open". This names the existing band truncation; it does not introduce a general PDE boundary-condition solver.
Implementation considerations
The natural extension point is sparse/_banded.py. The generic SparseOracleEncoding assembler should not need a periodic-specific algorithm.
- Locations: retain the existing modular shift and its explicit inverse.
- Values: periodic bands retain their coefficients across wrap-around instead of being masked to zero.
- Signed entries: compute the
upperbit from the actual wrapped row/column ordering. The current offset-sign rule is valid for clipped bands, but reverses at a periodic boundary. Simply removing the value mask would give incorrect signs for negative wrap-around entries. - Equivalent offsets: define whether offsets congruent modulo
Nare combined or rejected with a clear error. Cover the self-inverse half-period shift and theN=2case, where+1and-1address the same neighbor. Preserve a valid reverse-slot involution. - Contracts: retain clean scratch, zero-valued padded slots, explicit oracle inverses, the existing value-quantization model, and honest normalization/register accounting.
Initially scope this to one-dimensional periodic/circulant matrices. Coordinate-wise periodic boundaries on multidimensional meshes need a separate design; wrapping a flattened index is not equivalent.
Acceptance criteria
- Existing clipped-mode tests and behavior remain unchanged.
- Test periodic location/value oracles and their inverses, including coherent inputs, clean scratch, unused slots, and signed wrap-around entries.
- Compare the good block against an independently assembled quantized circulant matrix divided by the reported normalization; check unitarity and Hermiticity on the supported clean-scratch domain.
- Test the documented policy for offset aliases, half-period shifts, and very small dimensions.
- Add a small QSVT solve of the shifted periodic Laplacian, checked against an independent FFT/classical solution, with matrix-quantization and inverse-polynomial errors accounted for separately.
- Document the option and provide a runnable sparse-access example. Report its register and normalization costs explicitly; it need not match the qubit count of a specialized compact LCU encoding.
- Lingua principale
- Python
- Stelle
- 19
- Fork
- 18
- Merge medio
- 5g 18h
- PR unite (30g)
- 14
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun 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 NVIDIA/cudaq-algorithms
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA/cudaq-algorithms#110 ·
I maintainer di solito rispondono entro 8 giorni
-
Support negative spin projections in make_hartree_fock_occupationForse già presa @Schrodingerscat07 l’ha presa 20 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
NVIDIA/cudaq-algorithms#77 · 1 commento ·
I maintainer di solito rispondono entro 8 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
NVIDIA/cudaq-algorithms#76 ·
I maintainer di solito rispondono entro 8 giorni
-
`PauliLCU` accepts zero-width Pauli words (and target-free scalar `SpinOperator`s) and builds a `num_system = 0` encodingForse di nuovo libera @kubuyuk l’ha presa 11 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
NVIDIA/cudaq-algorithms#58 · 1 commento ·
I maintainer di solito rispondono entro 8 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
NVIDIA/cudaq-algorithms#108 ·
I maintainer di solito rispondono entro 8 giorni
Tutte le issue di NVIDIA/cudaq-algorithms
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