Skip to content

nycu-caslab/RTBQSim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.sh

Note: Ensure your OptiX SDK 9.0.0 files are placed in the location expected by the Dockerfile before running the build.

2. Start the Container

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.sh

Upon execution, you will be placed inside the container's shell.

Compilation

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.sh

Running Experiments

To 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.sh

Manual Execution

If 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>.txt

Example:

./build/apps/RTBQSim -c circuits/routing_n6.qasm -i input_batch/n6.txt

Scripts Reference

  • build_image.sh: Builds the rtbqsim_image Docker image and removes dangling images on failure.
  • run_image.sh: Starts the rtbqsim_container with the local directory mounted and NVIDIA GPUs enabled.
  • compile.sh: Automates the CMake configuration and Make compilation process (Release build).
  • rtbqsim.sh: Runs the main RTBQSim application with pre-configured QASM circuits and input batches.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published