Back
Integrations

Quside quantum entropy for NVIDIA CUDA applications


A cuRAND-style host integration for locally generated, verifiable randomness in GPU workflows.

Contact

Executive Summary

quside-curand connects the Quside Garnet Plus A41 QRNG to C++/CUDA applications through a familiar host-generator API. It supports two deployment patterns: direct quantum variates—using quantum-generated values directly in GPU workloads—and hybrid quantum seeding—using quantum entropy to seed high-throughput cuRAND generators. The integration is designed for teams that need stronger entropy provenance without redesigning their CUDA kernels.

The current landscape

GPU-accelerated applications depend on random numbers for Monte Carlo simulation, quantitative risk analysis, randomized algorithms, AI and machine-learning operations, and security functions. NVIDIA cuRAND provides efficient pseudorandom and quasirandom generation for CUDA, enabling extremely high throughput and reproducible execution.

Pseudorandom output is deterministic: it is produced from a seed and generator state. This is appropriate for most numerical workloads, but it creates a dependency on seed quality, uniqueness, storage, distribution, and lifecycle management. In distributed environments, seed reuse or poorly separated streams can be difficult to detect. In security-sensitive contexts, predictable or recoverable seeds can undermine the values generated from them.

The Challenge

  • Provenance: Can the application identify where its initial entropy came from and whether the source was operating correctly?
  • Independence at scale: Can thousands of workers or GPU jobs be initialized without accidental seed reuse or correlated starting states?
  • Performance: Can stronger entropy be introduced without replacing GPU-native generation for billions of samples?
  • Integration effort: Can teams change the entropy source without rewriting established CUDA kernels and data paths?

The solution

quside-curand is a thin C++/CUDA library that exposes the Quside Garnet Plus A41 QRNG through a host-generator-style API. Applications request quantum-generated data in host memory and transfer it to the GPU using their existing CUDA data path. The library provides uniform floats, uniform doubles, and raw 32-bit values, together with cuRAND-style status handling and diagnostic strings.

Because cuRAND does not expose a public interface for registering a third-party host generator, quside-curand is not a native curandGenerator_t plug-in. It is intentionally API-compatible in style, making the migration small and explicit while avoiding any claim that the library is part of NVIDIA cuRAND.

Key outcomes

  • Local entropy generation from Quside hardware installed in the target system.
  • Minimal application change at host-generation call sites and no required changes to existing GPU kernels.
  • Flexible deployment using direct quantum values or a hybrid quantum-seeded GPU stream.
  • Source-level assurance supported by Quside monitoring, raw/conditioned output modes, and engineering validation tools.
  • Transparent performance with separate reporting of entropy throughput and GPU compute time.

Architecture and data flow

Two practical integration patterns: use quantum entropy directly for selected values, or use it to seed high-throughput GPU generators.

Pattern A – Direct quantum variates

The application requests processed QRNG values through quside-curand, stores them in a host buffer, and transfers the buffer to GPU memory. This pattern is appropriate when the values themselves require physical entropy provenance or when the required volume is compatible with QRNG throughput.

  • Keys, nonces, salts, challenges, and security-sensitive values.
  • Independent starting states for distributed simulations.
  • Selected high-consequence variates or audit samples.
  • Applications that need to inspect raw or conditioned source output during engineering validation.

Pattern B – Hybrid quantum seeding

The application uses quantum entropy to create seed material or initial states and then uses cuRAND to expand the stream on the GPU. This pattern preserves native GPU throughput and is the recommended default for very large Monte Carlo or HPC workloads.

  • Large-scale simulations requiring billions of samples.
  • Multi-node or multi-GPU jobs where seed uniqueness must be managed across workers.
  • Workloads that need fresh initialization in production but deterministic replay in test environments.

Data-flow responsibilities

API quick reference

Minimal migration example

// Before: cuRAND host generator (pseudorandom)
curandGenerator_t gen;
curandCreateGeneratorHost(&gen, CURAND_RNG_PSEUDO_XORWOW);
curandGenerateUniform(gen, host_floats, n);
curandDestroyGenerator(gen);

// After: Quside Garnet Plus A41 (quantum entropy)
qcGenerator* gen;
qcCreateGeneratorHost(&gen, /*device=*/0, QC_ENTROPY_PROCESSED);
qcGenerateUniform(gen, host_floats, n);  // n floats in [0, 1)
qcDestroyGenerator(gen);

Generation occurs on the host. Transfer the resulting buffer to the GPU using the application’s existing cudaMemcpy or asynchronous transfer path. GPU kernels that consume the buffer do not need to change.

Recommended error handling 

qcStatus status = qcGenerateUniform(gen, host_floats, n);
if (status != QC_STATUS_SUCCESS) {
fprintf(stderr, “Quside RNG error: %s\n”, qcGetErrorString(status));
// Apply the application’s explicit fail-closed or fallback policy.
}

Security note: For security-sensitive use cases, avoid an unlogged automatic fallback from the QRNG to a deterministic or operating-system source. Define the fallback policy explicitly, expose it in telemetry, and fail closed when the application’s assurance requirement cannot be met

Build and installation

Prerequisites

  • Quside Garnet Plus A41 QRNG and the compatible Quside QRNG SDK.
  • NVIDIA GPU and supported driver environment.
  • CUDA Toolkit 12.x for the initial release.
  • CMake 3.20 or later.
  • A supported C++ toolchain and Linux environment compatible with the Quside SDK.

Configure and build

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake –build build

The package installs a static library, the public header, sample and validation utilities, and a CMake package configuration for find_package(quside_curand). Exact installation paths and optional flags should be confirmed against the release notes supplied with the software package.

Link from CMake

find_package(quside_curand REQUIRED)

target_link_libraries(my_cuda_app
PRIVATE
quside_curand::quside_curand
CUDA::curand
)

The target name above reflects the intended package interface and should be checked against the delivered release. Retain CUDA::curand when the same application also uses NVIDIA cuRAND for hybrid expansion.

Run the GPU Monte Carlo example

./build/montecarlo_pi 100000000
# Example output:
# pi = 3.14161212, abs error 1.95e-5

The example reports the sample count, pi estimate, absolute error, entropy throughput from the Quside board, and GPU compute time. Use it as an end-to-end reference for host generation, host-to-device transfer, and GPU consumption.

Validation utilities

The nist_feed utility can stream conditioned or raw QRNG output to a file or pipe. This utility supports engineering validation and integration testing; it should not be treated as a substitute for source-level entropy assessment.

# Generate a sample file for engineering analysis
./build/nist_feed –bytes 10000000 > sample.bin

# Stream raw output to Dieharder
./build/nist_feed –raw | dieharder -g 200 -a

Statistical batteries can identify anomalies and implementation errors, but passing them does not prove unpredictability. Review source health, min-entropy evidence, conditioning behavior, and operational telemetry as part of the assurance case.

Performance and design guidance

The supplied benchmark demonstrates the expected architectural trade-off. On the referenced NVIDIA RTX 3080 test system, the Quside Garnet Plus A41 delivered approximately 88 MB/s with approximately 1.2 ms latency, while a cuRAND XORWOW GPU generator reached approximately 150 Gsamples/s. The figures use different units and represent different operations; they are not a like-for-like performance comparison.

Deployment checklist

  • Define the assurance requirement. Identify which values require physical entropy and which can remain pseudorandom.
  • Choose the integration pattern. Use direct values for selected data or hybrid seeding for high-volume streams.
  • Separate test and production modes. Make reproducible development seeds and fresh production entropy explicit configuration choices.
  • Instrument the entropy path. Log device status, generation errors, selected source mode, and any fallback event.
  • Size buffers and transfers. Batch requests to reduce call and transfer overhead while respecting application latency.
  • Validate end to end. Test the QRNG, host buffer, transfer path, GPU consumption, and failure behavior in the target environment.
  • Document seed distribution. In multi-node systems, define how quantum seed material is allocated to workers and generator states.

Known boundaries

  • quside-curand is not a native extension of curandGenerator_t and is not distributed by NVIDIA.
  • Generation occurs on the host; applications remain responsible for host-to-device transfer.
  • Direct QRNG throughput is lower than arithmetic GPU generation. Use the hybrid pattern for very large streams.
  • Statistical test results do not by themselves establish entropy or unpredictability.
  • Exact API signatures, CMake target names, supported operating systems, and release compatibility should be confirmed against the delivered software version.

Support

To request the quside-curand package, integration support, or a Garnet Plus A41 evaluation, contact sales@quside.com or visit www.quside.com.