Bulk Swap Test: Variants & Applications
- Bulk Swap Test is a collection of quantum circuit designs extending the standard SWAP test to extract overlap information from many states using varied architectures.
- It incorporates recursive structures, parallelized methods, and ancilla-sharing modules to enable efficient multi-state overlap estimation and improved resource scaling.
- These architectures facilitate entanglement detection, process characterization, and noise mitigation in quantum metrology and quantum machine learning applications.
Bulk Swap Test is not a single standardized quantum-information primitive. Across the literature, the expression is used for several related constructions built from the standard SWAP test: recursive circuits that recover many pairwise overlaps among several states, parallelized tests whose full ancilla-output distribution encodes subsystem overlaps, many-copy routines based on repeated pairwise SWAP tests, and application-specific modules in quantum neural networks and metrology. In one prominent quantum-machine-learning usage, the term denotes a generalized SWAP-test module in which one ancilla is reused across multiple SWAP-test factors, producing a product layer rather than a separate named protocol (Nagies et al., 20 Jun 2025). In multi-state overlap estimation, by contrast, the term refers to circuits that route many state pairs through one reusable architecture so that all overlaps become recoverable over repeated runs (Liu et al., 2022, Gitiaux et al., 2021).
1. Standard SWAP-test foundation
The common baseline is the standard SWAP test. An ancilla is prepared in , a Hadamard gate is applied, a controlled-SWAP acts on two registers and , a second Hadamard is applied, and the ancilla is measured. The probability of obtaining is
so the circuit estimates the squared overlap between the two input states (Nagies et al., 20 Jun 2025).
This overlap-based interpretation extends beyond the textbook ancilla-controlled circuit. A destructive version removes the ancilla and reads the symmetry information directly from measurements on the compared systems. In quantum optics, the Hong–Ou–Mandel effect yields the same comparison statistic: the coincidence probability is
which is the SWAP-test failure probability. This establishes an explicit equivalence between SWAP-test state comparison and Hong–Ou–Mandel interference (Garcia-Escartin et al., 2013).
The standard form is therefore best understood as a symmetry test for two inputs. What later papers call “bulk” variants preserve this overlap logic while changing the number of inputs, the pattern of ancilla reuse, the measurement layout, or the application layer built on top of the test.
2. Recursive multi-state and many-copy generalizations
A major line of work generalizes the SWAP test from one compared pair to many states. In the “Multi-state Swap Test Algorithm,” a recursive circuit is constructed so that ancilla outcomes identify which permutation of the input states has been realized, and final swap tests on adjacent registers yield the corresponding overlap estimates. The scheme is designed to recover all pairwise overlaps among states with controlled-SWAP gates and 0 ancilla qubits. The circuit does not output all overlaps in one classical readout; rather, repeated runs over different ancilla branches make every pair recoverable (Liu et al., 2022).
A different recursive construction introduces a pairing unitary 1 that places every pair among 2 input states into the first two registers and labels the pair by an ancilla basis state. After a standard two-state SWAP test on those two registers, conditioning on the ancilla label yields
3
For this construction, the asymptotic resource bounds are 4 controlled-SWAP gates and 5 ancillary qubits (Gitiaux et al., 2021).
A further many-copy interpretation appears in random-SWAP protocols for purification and Schur sampling. There, the SWAP test is treated as a repeated singlet detector on randomly chosen qubit pairs. Singlet pairs are removed, and the remaining qubits are driven toward the totally symmetric subspace. For 6 qubits, the protocol achieves weak Schur sampling and unitary Schur sampling with error 7 after
8
random SWAP tests, and the probability of detecting any new singlet decreases exponentially once 9 reaches the 0 scale (Brahmachari et al., 7 Aug 2025).
These constructions share the same core principle: the SWAP test is no longer a one-pair comparator, but a reusable module for extracting structured information from many states or many copies.
3. Parallelized, ancilla-free, and photonic realizations
Another meaning of bulk SWAP testing is simultaneous or register-wise readout. In the 1-qubit parallelized SWAP test, one ancilla is assigned to each subsystem, each ancilla controls a local SWAP between corresponding subsystems of 2 and 3, and all ancillas are measured after a second Hadamard layer. If the measured bitstring is 4 with support 5, its probability is
6
This identifies each normalized shadow enumerator exactly with one output probability of the parallelized test, giving an operational meaning to shadow enumerators and enabling computation of Rains unitary and Shor–Laflamme enumerators from the same distribution (Shi et al., 2024).
Ancilla-free realizations push the same idea into different hardware models. For continuous-variable states 7 and 8, an ancilla-free SWAP test can be implemented by a 50:50 beamsplitter followed by photon-number-resolving detection, with the parity of one output mode determining the SWAP eigenvalue. The overlap obeys
9
and the protocol extends naturally to many mode pairs and to higher-order permutation tests (Volkoff et al., 2022).
Integrated photonic realizations implement the standard SWAP-test logic with path-encoded qudits. A linear photonic circuit using 0 spatial modes encodes two qubits plus ancilla in eight waveguides, realizes the controlled-SWAP passively by waveguide crossings, and estimates 1 from output counts. The reported root mean square error is smaller than 2 (Baldazzi et al., 2024).
Taken together, these works show that “bulk” may refer either to parallelization across subsystems, to ancilla-free multimode readout, or to hardware architectures that expose many overlap-related observables from one structured circuit.
4. SWAP-test quantum neural networks and product layers
In quantum machine learning, SWAP-test-based neural architectures form a distinct branch of the literature. An early model defines a quantum neuron whose output is determined by the inner product between an input state and a quantum weight state. The overlap 3 is estimated by a swap-test-plus-phase-estimation construction, transformed into rotation angles, and then used to prepare the neuron’s output qubit. In that architecture, the swap test underpins both forward propagation and gradient evaluation, and hidden-layer measurements are postponed so that later layers retain coherent inputs. A four-layer network trained on a checkerboard classification problem was reported to reach 4 test accuracy (Zhao et al., 2019).
A later analysis makes the classical correspondence explicit. For amplitude-encoded input
5
the standard SWAP-test QNN is mathematically equivalent to a classical two-layer feedforward network with quadratic activation. Its output is written as
6
Because quadratic activations are polynomial, the architecture violates the usual non-polynomial condition associated with the universal approximation theorem. This limitation becomes exact for parity: the paper proves that the original SWAP-test QNN cannot learn the 7-dimensional parity function for 8, regardless of network size (Nagies et al., 20 Jun 2025).
The proposed remedy is the construction most closely associated with “bulk swap test” in this context. Each module uses 9 copies of the input state, 0 corresponding weight states, and one ancilla shared across all 1 SWAP factors. The resulting module output is
2
and the full layer becomes a product layer. This raises the effective activation degree from 3 to 4, connects the architecture to classical product layers and 5-6-7 networks, and overcomes the parity obstruction empirically up to at least 8, with good performance when 9. The same work reports a pretrained 0 parity model achieving 1 accuracy in the classical surrogate, 2 on noiseless simulation, and 3 on IBM quantum hardware for the 3D parity task (Nagies et al., 20 Jun 2025).
In this literature, bulkness therefore refers not to an independent overlap-estimation primitive, but to combining many SWAP-test factors into one expressive learning module.
5. Entanglement, process characterization, and metrological mitigation
Several papers use bulk or multi-copy SWAP tests as diagnostic tools. For pure-state entanglement detection, one construction compares two copies of the same 4-qubit state and measures an 5-qubit control register, with one control qubit per test qubit. Product states return 6 with certainty, whereas entangled states generate characteristic nonzero control strings. In the two-qubit case, if the concurrence is 7, then
8
so 9 is an entanglement signature. For GHZ-like states, signatures are even numbers of ones in the control register; for W-like states, they are exactly two ones. The same paper proposes the multipartite quantity 0 and reports that the average number of copies needed to detect any entanglement can approach about 1 for large maximally entangled systems (Foulds et al., 2020).
A different entanglement-witness construction shows that the ordinary single-ancilla SWAP test can already witness entanglement in arbitrary two-qubit pure states, and by convexity in arbitrary two-qubit mixed states. If the ancilla-2 probability satisfies
3
then the state is entangled, and the concurrence obeys the lower bound 4 with 5. Without local preprocessing, about 6 of random entangled pure states are detected; with four local-unitary settings, this rises to 7 (Guaraldo et al., 23 Dec 2025).
For process characterization, the standard SWAP test is insufficient to distinguish purity loss from a mere rotation of a pure state. A modified protocol adds measurement of the control qubit in its preparation basis and combines the two bits of information according to
8
In a specific Toffoli-based realization, the post-selected probability becomes
9
so the output depends separately on the decoherence parameter 0 and the protocol rotation 1. Under those circumstances, the method can serve as an alternative to full quantum process tomography (Ripper et al., 2022).
In quantum metrology, a two-copy SWAP-test protocol is used to estimate indistinguishable noise that quantum error correction cannot remove. For two copies of a noisy probe state 2, the control-qubit 3-measurement yields
4
Under local dephasing, 5 decomposes into ideal and odd-error sectors, and the odd-sector weight is
6
The overlap estimate is then combined with a signal observable to form a corrected estimator of the unknown parameter. The paper presents the method as a complement to quantum error correction rather than a replacement, specifically for noise that overlaps with the signal (Lin et al., 22 May 2026).
6. Terminological status and related usages
The literature does not assign a single canonical meaning to “Bulk Swap Test.” In the generalized SWAP-test QNN, the phrase most naturally refers to “a number of 7 SWAP tests using the same ancilla qubit,” and the paper explicitly characterizes this as a product-module generalization rather than a separate bulk-testing protocol (Nagies et al., 20 Jun 2025). In the multi-class SWAP-test classifier, bulkness has yet another meaning: all training examples and their label states are encoded in one superposition, the SWAP-test circuit accumulates the kernel contributions in parallel, and a single-qubit reconstruction produces a Bloch-vector summary
8
for multi-class decision making. The circuit is bulk in its aggregation over training data, not as a literal many-target SWAP comparator (Pillay et al., 2023).
The term also appears by analogy outside quantum circuits. In structured two-sample testing, a “restricted block permutation” scheme is described as mimicking a bulk swap test by allowing only single cross-swaps between block-selected representatives. In that setting the one-swap increments for the difference of means and for the unbiased 9 statistic have conditional variances of order 0, in contrast to the 1 variability under full relabeling, while exact finite-sample validity is maintained for the fixed restricted permutation set (Ho, 29 Nov 2025). This is not a quantum SWAP test, but it shows that the phrase has begun to function as a broader descriptor for structured swap-based comparison.
A persistent source of confusion is therefore lexical rather than technical. Some works mean multi-state overlap extraction, some mean register-wise parallelization, some mean two-copy collective diagnostics, and some mean SWAP-factor aggregation inside a larger algorithmic module. The shared invariant is the use of swap-controlled symmetry information to expose overlap, purity, or class-separation structure; the differing feature is the scale at which that information is organized and read out.