[Paper Review] Simulation of Quantum Algorithms with a Symbolic Programming Language
This paper presents a symbolic programming framework in Mathematica that directly maps Dirac's bra-ket notation of quantum mechanics to executable code, enabling classical simulation of quantum algorithms like Shor's factoring algorithm. The key contribution is a computational language that preserves the mathematical structure of quantum mechanics, allowing accurate simulation of quantum operations, superposition, entanglement, and the quantum Fourier transform, with verified results matching theoretical predictions.
This study examines the simulation of quantum algorithms on a classical computer. The program code implemented on a classical computer will be a straight connection between the mathematical formulation of quantum mechanics and computational methods. The computational language will include formulations such as quantum state, superposition and quantum operator.
Motivation & Objective
- To develop a computational language that directly mirrors the mathematical formalism of quantum mechanics for classical simulation.
- To enable accurate simulation of quantum algorithms on classical computers using symbolic programming.
- To provide a bridge between theoretical quantum mechanics and practical implementation, facilitating verification of quantum algorithms.
- To demonstrate the feasibility of simulating complex quantum algorithms like Shor’s factoring algorithm using a high-level symbolic language.
- To lay the groundwork for future extensions to include density operators and mixed states in the computational framework.
Proposed method
- The framework uses symbolic notation to represent quantum states as linear combinations of basis vectors, e.g., e[ϕ] = α·e[0] + β·e[1], directly reflecting Dirac notation.
- Quantum operators are implemented as functions acting on state vectors, with explicit support for unitary operations like Hadamard, controlled-NOT, and Toffoli gates.
- Tensor products are implemented via pattern-matching rules to preserve linearity, e.g., e[a___, α·e[x___], b___] := α·e[a,x,b].
- The quantum Fourier transform (QFT) is constructed using sequential application of Hadamard, rotation, and swap gates in a defined order.
- Measurement is simulated by probabilistically selecting basis states based on amplitude squared, with convergence to the correct order via continued fractions.
- Shor’s algorithm is implemented by preparing superposition, computing x^c mod N, applying QFT, measuring, and extracting the period via continued fraction expansion.
Experimental results
Research questions
- RQ1How can a symbolic programming language be designed to preserve the mathematical structure of quantum mechanics in classical code?
- RQ2Can Shor’s factoring algorithm be accurately simulated on a classical computer using a high-level symbolic language?
- RQ3What computational techniques are required to simulate quantum operations like superposition, entanglement, and the quantum Fourier transform?
- RQ4How can measurement and period-finding be modeled in a classical simulation to recover the order r in Shor’s algorithm?
- RQ5What is the role of continued fractions in extracting the period from the measured output of the quantum Fourier transform in a classical simulation?
Key findings
- The simulation framework successfully maps Dirac notation to executable Mathematica code, preserving the mathematical structure of quantum states and operators.
- Shor’s algorithm was implemented in Mathematica, with correct simulation of superposition, modular exponentiation, and quantum Fourier transform.
- The probability of successfully finding the period r using the simulation is at least 9/160 log log N, matching theoretical bounds.
- The simulation correctly identifies valid orders r by checking that x^(r/2) ≠ -1 mod N, enabling factorization of N.
- The use of continued fractions on measured outcomes reliably recovers the period r, leading to the correct factorization of N.
- The framework demonstrates that classical simulation can verify quantum algorithm outputs, providing a stable benchmark for future quantum experiments.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.