- The paper introduces an operator-level simulation framework for Szegedy quantum walks, achieving optimal complexity with O(N²) for dense graphs and O(N) for sparse graphs.
- It utilizes efficient sparse representations and blockwise matrix operations to simulate quantum phase estimation, enhancing practical algorithm performance.
- The framework, implemented in the SQWLib Python package, enables robust numerical experiments in quantum search, simulated annealing, and marked-node detection.
Efficient Classical Simulation of Szegedy Quantum Walks and Algorithms
Overview
The paper "Efficient Simulation of Szegedy Quantum Walk Formulations and Algorithms" (2606.14226) presents a general and performant classical simulation framework for discrete-time Szegedy quantum walks, encompassing various walk formulations and their algorithmic applications, especially those coupled to quantum phase estimation (QPE). The authors unify operator-level simulation techniques and introduce efficient sparse representations, achieving optimal asymptotic scaling for both dense and sparse graphs. The framework is instantiated in the Python package SQWLib, which is demonstrated via numerical experiments on quantum simulated annealing, quantum search, and marked-node detection.
Szegedy quantum walks generalize discrete-time quantum walks to arbitrary Markov chains, with Hilbert space H=CN⊗CN. The canonical walk operator W is constructed from a pair of reflection operators based on the Markov transition matrix and a swap operator, yielding dynamics restricted to a (2N)-dimensional dynamical subspace. Alternative formulations such as similarity transforms using update operators V, and reflections around computational basis states, enable algorithmic flexibility for optimization and sampling tasks.
Figure 1: Expansion-recomposition for Szegedy walk simulation, showing blockwise matrix operations for state evolution.
This operator-level approach supports various Szegedy walk constructions beyond the original formulation, without requiring explicit construction of a N2×N2 unitary.
Efficient Simulation Algorithms
Dense Graphs
The authors extend prior work by constructing memory-saving algorithms that avoid explicit unitary matrices. Quantum states are represented as N×N matrices, and fundamental operators (reflection R, update V, swap S) are simulated via blockwise expansion and recomposition primitives. For dense graphs, this results in O(N2) time and memory complexity, matching the transition matrix’s inherent information content.
Sparse Graphs
For sparse graphs, the evolution is efficiently restricted to a reduced subspace W0 determined by the graph's symmetrized adjacency. All state vectors and operator matrices are stored only for the nonzero elements aligned via NumPy arrays, reducing complexity to W1 for graphs with W2 edges.
Figure 2: Sparse representation of the reduced subspace W3 for efficient quantum walk simulation.
Vectorization over batches of states enables parallel simulation, facilitating QPE-based protocols without loss of efficiency.
Figure 3: Expansion-recomposition in the reduced subspace demonstration for sparse graphs.
Operator Implementation Variability
The update operator W4 is not uniquely defined, leading to potential implementation-dependent dynamics, particularly when evolving with multiple Markov chains or measuring non-standard registers. Simulations confirm that, for most algorithms of practical interest (i.e., those measuring the first register), the probability distribution is invariant under different W5 implementations, as theoretically predicted. However, for algorithms involving sequential application of different transitions or measurements on the second register, discrepancies may arise.

Figure 4: Consistent probability distributions for first register measurement across Szegedy walk formulations; variability observed for second register.
Figure 5: Implementation-dependent results for walk formulations concatenating different Markov chains.
Quantum Phase Estimation Coupling
Szegedy walks possess spectral structure amenable to quantum phase estimation, enabling algorithms for detection, sampling, and search. The authors provide two simulation strategies: operational simulation of QPE gates (Hadamard, controlled-W6, QFT) and a direct approach for canonical QPE circuits starting from W7 in the phase register. Transformation of the composite state is implemented as blockwise tensor operations with efficient vectorization.
Figure 6: Matrix representation of a multi-register state for QPE-based algorithms.
Figure 7: Controlled evolution in QPE simulation with batch operations.
Figure 8: Sequential QPE-based evolution from a single Szegedy state.
Numerical Experiments and Algorithmic Demonstrations
Marked Node Detection
QPE applied to symmetric, undirected graphs can efficiently detect marked nodes by measuring the phase register: phase W8 if no marked nodes, nonzero otherwise. This is realized in W9 walk steps, in accordance with theoretical speedups.

Figure 9: Phase register outcome for QPE-based marked node detection, contrasting (2N)0 vs (2N)1 marked nodes.
Quantum Simulated Annealing (QSA)
Quantum simulated annealing leverages Szegedy walks and QPE to sample stationary distributions of Markov chains corresponding to Boltzmann distributions. The authors simulate Ising spin-glass systems with (2N)2 qubits across multiple cooling steps, showing preparation of quantum states that closely match classical stationary distributions for increasing (2N)3.





Figure 10: Quantum and classical stationary distributions after each annealing step in QSA protocol.
Probability of successful state preparation at each step is tracked, verifying that sufficiently slow annealing schedules yield joint success probability near unity.

Figure 11: Probability of phase-zero measurement as a function of annealing steps and annealing schedule.
Quantum Search via Amplitude Amplification
Quantum search on graphs employs Szegedy walks, QPE-based reflection operators, and amplitude amplification to efficiently locate marked nodes. Numerical results confirm that, with multiple phase registers (and (2N)4 qubits per register), the measured probability converges to theoretical maxima for amplitude amplification, and marked nodes are sampled according to stationary distribution.

Figure 12: Quantum walk search: marked node detection probability and distribution as function of phase register repetition.
Practical and Theoretical Implications
The operator-level simulation framework enables efficient numerical exploration of quantum walk-based algorithms beyond analytical tractability, especially for large and sparse graphs. The methods equip researchers with tools for experimentation, validation, and heuristic development for quantum-inspired machine learning, optimization, and search. Furthermore, by decoupling simulation from explicit unitary matrix construction, the framework is scalable and extensible to other quantum walk variants and quantum algorithms leveraging phase estimation.
Conclusion
This work establishes an efficient, general-purpose simulation framework for Szegedy quantum walks and phase-estimation-based algorithms, attaining optimal scaling for both dense and sparse graphs via operator-level algorithms. The approach supports diverse walk formulations and QPE-based protocols, demonstrated via representative numerical experiments and implemented in the open-source SQWLib library. The framework is poised to facilitate future investigations in quantum machine learning, combinatorial optimization, and reinforcement learning, as well as providing simulation infrastructure for algorithmic prototyping and complexity assessment.