This repository contains experimental implementations of Simon's Algorithm on noisy intermediate-scale quantum (NISQ) devices using IBM and IonQ cloud-accessible quantum hardware. For a detailed discussion of the methods and results, refer to the associated publication: Entropy 27, 658 (2025).
Let
This repository implements Simon’s algorithm in practice, analyzing its performance on real NISQ devices, including IonQ and IBM hardware. From the paper abstract,
Simon’s algorithm was one of the first to demonstrate a genuine quantum advantage in solving a problem. The algorithm, however, assumes access to fault-tolerant qubits. In our work, we use Simon’s algorithm to benchmark the error rates of devices currently available in the "quantum cloud". As a main result, we objectively compare the different physical platforms made available by IBM and IonQ. Our study highlights the importance of understanding the device architectures and topologies when transpiling quantum algorithms onto hardware. For instance, we demonstrate that two-qubit operations on spatially separated qubits on superconducting chips should be avoided.
The repository structure is as follows:
simons-algorithm/
├── src/ # Core implementation and analysis code
│ ├── cnotTest.py # Tests the fidelity of CNOT gates based on qubit distance
│ ├── combinedPlotting.ipynb # Generates publication-quality plots from data
│ ├── dataGeneration.py # Runs Simon's algorithm on quantum hardware
│ ├── forteGeneration.ipynb # Collects data from IonQ's Forte device
│ ├── imbDataCollection.py # Gathers results from IBMQ jobs
│ └── plotting.py # Utilities for creating plots from experimental data
├── APIs/ # API folder (must be created locally)
│ ├── IBM_API.txt # IBM API file (must be created locally)
│ ├── IonQ_API.txt # IonQ API file (must be created locally)
├── data/ # Experimental data for Simon's algorithm
├── cnotData/ # Results of experiments on CNOT fidelity vs. distance
├── figures/ # Figures generated from data for publication
├── archive/ # Legacy code, diagrams, and poster materials
├── .gitignore # Specifies untracked files to ignore
├── LICENSE # Project license
└── README.md # This file
The most important scripts are located in the src/ directory. These perform data collection, analysis, and visualization, and were used to generate the figures and results in the published paper.
To run Simon’s algorithm on NISQ devices and analyze the results:
- Generate Data
- IonQ: Use dataGeneration.py or forteGeneration.ipynb to submit jobs.
- IBM: Use the IBM composer tool to submit jobs, and imbDataCollection.py to collect job results.
- CNOT Benchmarking
- Run cnotTest.py to test how the CNOT error rate varies with qubit separation.
- Plotting and Analysis
- Use plotting.py, combinedPlotting.ipynb, or forteGeneration.ipynb to visualize the collected data.
- Figures are saved in the figures/ directory.
Note: Access to IBM or IonQ cloud resources requires API credentials.
This project is licensed under the MIT License — see the LICENSE file for details.