cuda-q
**This is an old revision of the document!**
Table of Contents
CUDA-Q
CUDA-Q is NVIDIA's open-source C++/Python framework for hybrid quantum-classical computing. Targets variational algorithms (VQE, QAOA) with GPU-accelerated classical optimization and quantum simulation. Supports multiple backends (GPU simulators, vendor hardware). Includes automatic differentiation for gradients. Designed for HPC workflows and large-scale simulation.
The following example demonstrates a variational quantum eigensolver (VQE) for a two-qubit system:
import cudaq from scipy.optimize import minimize # Define ansatz for VQE def ansatz(theta): qvec = cudaq.qvector(2) cudaq.h(qvec[0]) cudaq.ry(theta[0], qvec[0]) cudaq.cx(qvec[0], qvec[1]) return cudaq.observe(qvec, cudaq.pauli_word({0: 'Z', 1: 'Z'})) # Minimize ⟨ZZ⟩ with COBYLA result = minimize(lambda θ: ansatz(θ).expectation(), x0=[0.0], method='COBYLA') print(f"Ground state energy: {result.fun:.4f}")
cuda-q.1787422806.md.gz · Last modified: by Ivan Janevski
