Papers
Topics
Authors
Recent
Search
2000 character limit reached

Coherent Rank-Select in Quantum Algorithms

Updated 5 July 2026
  • The paper introduces a coherent reversible rank-select primitive that maps entangled validity masks to valid bit positions with a sentinel totalization rule to handle out-of-range ranks.
  • It employs both a sequential bounded-span scan and a blocked construction to optimize gate count and circuit depth, achieving bounds like O(Nw) and O(N log w).
  • The construction integrates into coherent rollout oracles, reversibly mapping basis-state selectors to actions, and plays a role analogous to classical rank-select in succinct indexing.

Searching arXiv for the cited papers to ground the article in current arXiv records. Coherent rank-select is a reversible basis-state selection primitive for quantum algorithms on branch-dependent action spaces. In the formulation studied in "Coherent Rollout Oracles for Finite-Horizon Sequential Decision Problems" (Shukla, 28 Apr 2026), a quantum state register determines an entangled NN-bit validity mask, a selector register stores a rank rr, and the primitive returns the position of the rr-th valid bit or a sentinel when rr is out of range. The construction is motivated by coherent rollout for sequential decision problems, where randomness must live in explicit quantum registers and basis-state selectors must be mapped to actions reversibly.

1. Formal definition

Let ∣s⟩\lvert s\rangle be a state register whose content defines a validity mask

Ms=(Ms(0),Ms(1),…,Ms(N−1))∈{0,1}N,M_s=(M_s(0),M_s(1),\dots,M_s(N-1))\in\{0,1\}^N,

where Ms(i)=1M_s(i)=1 iff action ii is valid in branch ss. Let ∣r⟩\lvert r\rangle be a rank register, and let the output register have width

rr0

so that it can encode positions rr1, with rr2 used as a sentinel (Shukla, 28 Apr 2026).

The primitive is defined through the partial function

rr3

where rr4, and

rr5

The coherent rank-select unitary rr6 acts as

rr7

A central structural feature is totalization by sentinel: although the underlying notion is the position of the rr8-th valid bit, the unitary must be total on computational basis states, so the output rr9 encodes failure. This removes partiality without discarding reversibility.

2. Circuit model and resource measures

The analysis in (Shukla, 28 Apr 2026) distinguishes two reversible-circuit models. In the bounded-fan-in, long-range model, gates act on at most rr0 qubits, but any subset of qubits may interact. The primary resources are gate count rr1, ancilla qubits rr2, and circuit depth rr3. In the bounded-span scan model, validity bits are laid out on a line at positions rr4, and each gate of support size at most rr5 may cross at most rr6 adjacent prefix cuts. The same measures rr7, rr8, and rr9 are counted, together with total crossing mass of span.

The persistent registers are the state register rr0, the rank selector rr1 of width rr2, the output register rr3 of width rr4, and an ancilla pool of size rr5, reused and cleaned (Shukla, 28 Apr 2026).

This operational setting is stricter than classical selection over a stored mask. The mask may be entangled with the state register, and the implementation must preserve unitarity, return all ancillae to rr6, and avoid implicit randomness. The abstract of (Shukla, 28 Apr 2026) states this requirement directly: coherent quantum rollout requires a unitary simulator, randomness must live in explicit quantum registers, and basis-state selectors must be mapped to actions reversibly.

3. Sequential bounded-span scan

The first construction in (Shukla, 28 Apr 2026) is a left-to-right reversible scan. It maintains a rr7-bit running count rr8 of previously seen rr9-bits and initializes the output register to the sentinel ∣s⟩\lvert s\rangle0. For each position ∣s⟩\lvert s\rangle1, it reads the entangled validity bit ∣s⟩\lvert s\rangle2, compares ∣s⟩\lvert s\rangle3 with ∣s⟩\lvert s\rangle4, forms a match flag ∣s⟩\lvert s\rangle5, conditionally XORs ∣s⟩\lvert s\rangle6 into the output, uncomputes the comparison, and conditionally increments ∣s⟩\lvert s\rangle7. After the forward pass, the increment chain is reversed to uncompute ∣s⟩\lvert s\rangle8.

Per iteration, the construction uses one ∣s⟩\lvert s\rangle9-bit reversible equality check with Ms=(Ms(0),Ms(1),…,Ms(N−1))∈{0,1}N,M_s=(M_s(0),M_s(1),\dots,M_s(N-1))\in\{0,1\}^N,0 Toffoli/CNOT gates and depth Ms=(Ms(0),Ms(1),…,Ms(N−1))∈{0,1}N,M_s=(M_s(0),M_s(1),\dots,M_s(N-1))\in\{0,1\}^N,1, one multi-target XOR of Ms=(Ms(0),Ms(1),…,Ms(N−1))∈{0,1}N,M_s=(M_s(0),M_s(1),\dots,M_s(N-1))\in\{0,1\}^N,2 CNOTs and depth Ms=(Ms(0),Ms(1),…,Ms(N−1))∈{0,1}N,M_s=(M_s(0),M_s(1),\dots,M_s(N-1))\in\{0,1\}^N,3, and one Ms=(Ms(0),Ms(1),…,Ms(N−1))∈{0,1}N,M_s=(M_s(0),M_s(1),\dots,M_s(N-1))\in\{0,1\}^N,4-bit ripple-carry increment with Ms=(Ms(0),Ms(1),…,Ms(N−1))∈{0,1}N,M_s=(M_s(0),M_s(1),\dots,M_s(N-1))\in\{0,1\}^N,5 gates and depth Ms=(Ms(0),Ms(1),…,Ms(N−1))∈{0,1}N,M_s=(M_s(0),M_s(1),\dots,M_s(N-1))\in\{0,1\}^N,6. The uncompute steps exactly reverse the same cost (Shukla, 28 Apr 2026).

The resulting resource bounds are

Ms=(Ms(0),Ms(1),…,Ms(N−1))∈{0,1}N,M_s=(M_s(0),M_s(1),\dots,M_s(N-1))\in\{0,1\}^N,7

The paper further states that this sequential scan is gate-optimal in the bounded-span, bounded-fan-in model. The proof sketch uses a prefix-suffix communication argument: varying the first Ms=(Ms(0),Ms(1),…,Ms(N−1))∈{0,1}N,M_s=(M_s(0),M_s(1),\dots,M_s(N-1))\in\{0,1\}^N,8 bits of the mask can force the remainder of the circuit to reveal Ms=(Ms(0),Ms(1),…,Ms(N−1))∈{0,1}N,M_s=(M_s(0),M_s(1),\dots,M_s(N-1))\in\{0,1\}^N,9 bits, each cut-crossing gate transmits at most Ms(i)=1M_s(i)=10 bits, and summing over the Ms(i)=1M_s(i)=11 cuts yields an Ms(i)=1M_s(i)=12 lower bound (Shukla, 28 Apr 2026).

4. Blocked construction and lower bounds

When long-range gates are allowed, (Shukla, 28 Apr 2026) gives a blocked construction with asymptotically smaller gate count. Positions are partitioned into Ms(i)=1M_s(i)=13 blocks of size Ms(i)=1M_s(i)=14. A global prefix sum Ms(i)=1M_s(i)=15 and global output register are maintained. For each block Ms(i)=1M_s(i)=16, the circuit computes the block population

Ms(i)=1M_s(i)=17

by a balanced reversible adder tree, computes a take flag

Ms(i)=1M_s(i)=18

and local rank Ms(i)=1M_s(i)=19, runs a sequential scan within the block to obtain a local index ii0, conditionally XORs ii1 into the output, updates ii2, and then uncomputes the temporary data.

The corresponding bounds are

ii3

with long-range fan-in used to build the block adder tree in depth ii4 (Shukla, 28 Apr 2026).

The same work also proves an unconditional lower bound in the broader bounded-fan-in setting: any reversible circuit for ii5 must have ii6. The proof sketch considers rank ii7: the all-zero mask produces output ii8, while the singleton mask ii9 produces output ss0. Hence every input bit ss1 influences the output, and in a ss2-fan-in reversible circuit each gate can bring in at most ss3 new inputs into the backward light cone of an output qubit, forcing ss4 gates.

Construction or bound Model Resource statement
Sequential scan Bounded-span, bounded-fan-in ss5, ss6, ss7
Blocked construction Bounded-fan-in with long-range gates ss8, ss9, ∣r⟩\lvert r\rangle0
Unconditional lower bound Any bounded-fan-in model ∣r⟩\lvert r\rangle1

These results isolate a basic trade-off. Bounded-span locality enforces an ∣r⟩\lvert r\rangle2 gate barrier, while long-range interactions permit an ∣r⟩\lvert r\rangle3 construction but do not remove the ∣r⟩\lvert r\rangle4 dependence on the mask length.

5. Composition into coherent rollout oracles

In (Shukla, 28 Apr 2026), coherent rank-select is not treated as an isolated primitive; it is the indexing phase of a larger coherent rollout oracle for finite-horizon planning problems. For each round ∣r⟩\lvert r\rangle5, the oracle composes three phases.

First, ∣r⟩\lvert r\rangle6 decodes ∣r⟩\lvert r\rangle7 to a valid action position. Second, a reversible transition circuit ∣r⟩\lvert r\rangle8 updates the configuration using fresh randomness dice registers that are never discarded, so ∣r⟩\lvert r\rangle9 remains available; the stated cost is rr00 gates per round for bounded-neighbors. Third, a reversible predicate rr01 writes the payoff into one qubit; the stated cost is rr02 if the task compares two rr03-bit counts over rr04 cells (Shukla, 28 Apr 2026).

The total unitary is

rr05

with total gate and qubit costs

rr06

The paper states that this oracle satisfies the access model of the best-arm pipeline of Wang et al. Plugging it into amplitude estimation and Dürr–Høyer maximum finding gives an rr07-correct best-arm algorithm using

rr08

calls to rr09 and rr10, against the classical rr11 rollout-query lower bound (Shukla, 28 Apr 2026). The same work gives a bounded-influence lifting theorem extending the lower-bound construction from a base configuration to an exponential family of configurations, instantiates the framework on SIR epidemic intervention, includes a stochastic placement-game sanity check, and machine-checks the main results in Lean 4.

6. Relation to classical rank-select structures

Classical rank and select are basic operations on sequences and bitvectors, with applications in compressed text indexes and other space-efficient data structures (Chiu et al., 13 Apr 2026, Chiu et al., 8 Sep 2025). In classical notation for bitvectors, for rr12,

rr13

and these operations form the backbone of more complex structures such as wavelet trees (Chiu et al., 8 Sep 2025).

The relationship to coherent rank-select is structural rather than merely terminological. Wavelet forests, as revisited in (Chiu et al., 13 Apr 2026), partition the input sequence into fixed-size blocks, build a separate pointerless canonical Huffman-shaped wavelet tree for each block, and support rank by a three-tier sampled-counts strategy over hyperblocks, superblocks, and blocks. The same paper extends the structure to select queries, reusing the rank-sampling arrays, with select time rr14 and rank time rr15, while experiments show that wavelet forests are competitive with, and in most cases outperform, standalone wavelet-tree implementations.

At the bitvector level, "Engineering Select Support for Hybrid Bitvectors" (Chiu et al., 8 Sep 2025) augments a hybrid bitvector that already supports constant-time rank so that it also supports constant-time select while using only rr16 additional bits beyond the concatenation of the per-block compressed bitstreams. The implementation partitions the bitvector into fixed-size blocks, groups them into superblocks and hyperblocks, and answers rr17 through a sparse sampling of superblocks plus a block-local select routine specialized to plain, run-length, or minority encoding.

These classical constructions and the coherent primitive solve different problems. Classical designs optimize succinct storage and local decoding on static sequences or bitvectors, whereas coherent rank-select is a reversible unitary on an entangled validity mask with a sentinel totalization rule (Shukla, 28 Apr 2026). A plausible implication is that the quantum primitive occupies, for reversible decision pipelines, a role analogous to the role classical rank/select occupies in succinct indexing: it is a low-level access mechanism on which larger algorithmic frameworks are built.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (3)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Coherent Rank-Select.