Here is the consolidated README.md file without emojis or special icons.
# RTBQSim
RTBQSim is a high-performance quantum circuit simulator leveraging NVIDIA OptiX for ray-tracing-based acceleration. This project integrates and extends functionalities from existing state-of-the-art simulation and sparse matrix multiplication libraries.
## Origins and Acknowledgements
This project is originally forked from and inspired by the following repositories:
* **BQSim**: https://github.com/IDEA-CUHK/BQSim.git
* **RTSpMSpM**: https://github.com/escalab/RTSpMSpM.git
## Prerequisites
To run this project, the host environment requires:
* **NVIDIA GPU** (Compute Capability 7.0 or higher is recommended).
* **NVIDIA Drivers** installed and functioning.
* **Docker Engine**.
* **NVIDIA Container Toolkit** (required to pass GPU access to Docker containers).
* **NVIDIA OptiX SDK 9.0.0**: You must have the OptiX SDK 9.0.0 installer or files available locally, as they are required during the build process.
## Setup and Installation
This project utilizes a Docker-based workflow to manage dependencies and build environments.
### 1. Build the Docker Image
Use the provided build script to create the Docker image. This script compiles the image defined in `Dockerfile.dev` and handles the cleanup of dangling images if the build fails.
```bash
chmod +x build_image.sh
./build_image.shNote: Ensure your OptiX SDK 9.0.0 files are placed in the location expected by the Dockerfile before running the build.
Use the run script to launch the development container. This script mounts the current local directory to /workspace/RTBQSim inside the container and enables full GPU access.
chmod +x run_image.sh
./run_image.shUpon execution, you will be placed inside the container's shell.
Once inside the container, compile the project using the provided helper script. This script cleans the previous build artifacts, configures the project with CMake (Release mode), and compiles using 12 parallel jobs.
# Execute inside the Docker container
./compile.shTo run the simulation experiments, use the execution script. This script runs the compiled RTBQSim binary with specific circuit inputs.
# Execute inside the Docker container
./rtbqsim.shIf you need to run specific circuits manually, use the following command structure:
./build/apps/RTBQSim -c circuits/<circuit_file>.qasm -i input_batch/<input_file>.txtExample:
./build/apps/RTBQSim -c circuits/routing_n6.qasm -i input_batch/n6.txtbuild_image.sh: Builds thertbqsim_imageDocker image and removes dangling images on failure.run_image.sh: Starts thertbqsim_containerwith the local directory mounted and NVIDIA GPUs enabled.compile.sh: Automates the CMake configuration and Make compilation process (Release build).rtbqsim.sh: Runs the mainRTBQSimapplication with pre-configured QASM circuits and input batches.