Quantum walks provide a versatile framework for quantum algorithms across a wide range of applications. We develop efficient classical simulation methods for Szegedy quantum walks that avoid explicit construction of the full unitary evolution operator. Unlike previous approaches restricted to a particular walk formulation, our framework is built from fundamental update and reflection operators, enabling the simulation of a broader class of Szegedy walk formulations. We further extend these methods to phase-estimation-based algorithms coupled to the walk, including implementations suitable for large sparse graphs. The resulting methods achieve optimal
O(N2) complexity for dense graphs with
N nodes. For sparse graphs, the computational cost scales linearly with the number of edges, which is
O(N) in many cases. We implement the framework in the Python package SQWLib and illustrate its capabilities through simulations of representative algorithms, including quantum simulated annealing and quantum search on graphs. These results provide a practical tool for studying Szegedy-walk-based algorithms numerically beyond purely analytical treatments.
Abstract Szegedy's quantum walk is an algorithm for quantizing a general Markov chain. It has plenty of applications, such as many variants of optimizations. In order to check its properties in an error‐free environment, it is important to have a classical simulator. However, the current simulation algorithms require a great deal of memory due to the particular formulation of this quantum walk. In this paper, a memory‐saving algorithm is proposed that scales as with the size of the graph. Additional procedures are provided for simulating Szegedy's quantum walk over mixed states and also the Semiclassical Szegedy walk. With these techniques, a classical simulator in Python called SQUWALS (Szegedy QUantum WALks Simulator) has been built. It is shown that the simulator scales as in both time and memory resources. This package provides some high‐level applications for algorithms based on Szegedy's quantum walk, as for example the quantum PageRank.