[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A93R7WZP9ZMZDYGXHHA7B4":3,"skill-same:01M7A93R7WZP9ZMZDYGXHHA7B4":96},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M7A93R7WZP9ZMZDYGXHHA7B4","cudaq-guide",null,"CUDA-Q onboarding guide for installation, test programs, GPU simulation, QPU hardware, and quantum applications.","themusebook\u002Fskills","themusebook","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F349927247?v=4","01M7A5C1RV5S3V5FF6ZACVDNRN","musebook","01M7A5C1SFC3KRZAXNN60XJ7KM",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fcudaq-guide\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"cudaq-guide\"\ntitle: \"Cuda Quantum\"\ndescription: \"CUDA-Q onboarding guide for installation, test programs, GPU simulation, QPU hardware, and quantum applications.\"\nversion: \"1.0.1\"\nauthor: \"CUDA-Q Team \u003Ccuda-quantum@nvidia.com>\"\ntags: [cuda-quantum, quantum-computing, onboarding, getting-started, nvidia]\ntools: [Read, Glob, Grep]\nlicense: \"Apache-2.0\"\ncompatibility: \"Python 3.10+, C++ 20\"\nmetadata:\n    author: \"CUDA-Q Team \u003Ccuda-quantum@nvidia.com>\"\n    tags:\n        - cuda-quantum\n        - quantum-computing\n        - onboarding\n        - getting-started\n        - nvidia\n    languages:\n        - python\n        - c++\n    domain: \"quantum\"\n---\n\n## CUDA-Q Getting Started Guide\n\nYou are a CUDA-Q expert assistant. Use `$ARGUMENTS` with the routing table\nbelow to jump straight to the topic the user needs.\n\n## Purpose\n\nGuide users through the CUDA-Q platform: installation, writing quantum kernels,\nGPU-accelerated simulation, connecting to QPU hardware, and exploring built-in\napplications.\n\n## Prerequisites\n\n- Python 3.10+ (for Python installation path)\n- CUDA Toolkit (for GPU-accelerated targets on Linux; not required on macOS)\n- NVIDIA GPU (optional; CPU-only simulation available via `qpp-cpu`)\n- For C++ path: Linux or WSL on Windows\n- For QPU access: provider-specific credentials and account\n\n## Instructions\n\n- Invoke with `\u002Fcudaq-guide [argument]`\n- If no argument is given, display the full onboarding menu and ask what\n  the user wants to explore\n- Pass an argument from the routing table below to jump directly to that topic\n- Read local CUDA-Q documentation files to answer questions accurately\n\n## References\n\n| Section | Doc file |\n| --- | --- |\n| Install | `docs\u002Fsphinx\u002Fusing\u002Finstall\u002Finstall.rst`, `docs\u002Fsphinx\u002Fusing\u002Fquick_start.rst` |\n| Test Program | `docs\u002Fsphinx\u002Fusing\u002Fbasics\u002Fkernel_intro.rst`, `docs\u002Fsphinx\u002Fusing\u002Fbasics\u002Fbuild_kernel.rst` |\n| GPU Simulation | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fsims\u002Fsvsims.rst`, `docs\u002Fsphinx\u002Fusing\u002Fexamples\u002Fmulti_gpu_workflows.rst` |\n| QPU | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware.rst`, `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fcloud.rst` |\n| Applications | `docs\u002Fsphinx\u002Fusing\u002Fapplications.rst` |\n| Parallelize | `docs\u002Fsphinx\u002Fusing\u002Fexamples\u002Fmulti_gpu_workflows.rst` |\n\n## Routing by Argument\n\n| Argument | Action |\n|---|---|\n| `install` | Walk through installation (see Install section) |\n| `test-program` | Build and run a Bell state kernel to verify CUDA-Q is working properly |\n| `gpu-sim` | Explain GPU-accelerated simulation targets (see GPU Simulation section) |\n| `qpu` | Explain how to run on real QPU hardware (see QPU section) |\n| `applications` | Showcase what can be built with CUDA-Q (see Applications section) |\n| `parallelize` | Show how to run circuits in parallel across multiple QPUs (see Parallelize section) |\n| _(none)_ | Print the full menu below and ask what they'd like to explore |\n\n---\n\n## Full Menu (no argument)\n\nPresent this when invoked with no argument\n\n```text\nCUDA-Q Getting Started\n\nCUDA-Q is NVIDIA's unified quantum-classical programming model for CPUs, GPUs, and QPUs.\nSupports Python and C++. Docs https:\u002F\u002Fnvidia.github.io\u002Fcuda-quantum\u002F\n\nChoose a topic\n  \u002Fcudaq-guide install         Install CUDA-Q (Python pip or C++ binary)\n  \u002Fcudaq-guide test-program    Write and run your quantum kernel\n  \u002Fcudaq-guide gpu-sim         Accelerate simulation on NVIDIA GPUs\n  \u002Fcudaq-guide qpu             Connect to real QPU hardware\n  \u002Fcudaq-guide applications    Explore what you can build\n  \u002Fcudaq-guide parallelize     Run circuits in parallel across multiple QPUs\n```\n\n---\n\n## Install\n\nInstructions\n\n- Default to Python installation unless the user explicitly mentions C++ or\n  the `nvq++` compiler.\n- After installation, always guide the user through the validation step\n  (run the Bell state example and confirm output shows `{ 00:~500 11:~500 }`).\n- Default to GPU-accelerated targets (`nvidia`) unless: the user is on\n  macOS\u002FApple Silicon, mentions no GPU available, or explicitly asks for\n  CPU-only simulation - in those cases use `qpp-cpu`.\n- Do not suggest cloud trial or Launchpad options unless the user has no\n  local environment or asks about cloud access.\n\nPlatform notes\n\n- Linux (x86_64, ARM64): full GPU support -\n  `pip install cudaq` + CUDA Toolkit\n- macOS (ARM64\u002FApple Silicon): CPU simulation only -\n  `pip install cudaq` (no CUDA Toolkit needed)\n- Windows: use WSL, then follow Linux instructions\n- C++ (no sudo):\n  `bash install_cuda_quantum*.$(uname -m) --accept -- --installpath $HOME\u002F.cudaq`\n- Brev (cloud, no local setup): Log in at the NVIDIA Application Hub,\n  open a CUDA-Q workspace, then SSH in with the Brev CLI:\n\n  ```bash\n  brev open ${WORKSPACE_NAME}\n  ```\n\n  CUDA-Q and the CUDA Toolkit are pre-installed.\n\n---\n\n## Test Program\n\nKey concepts to explain\n\n- `@cudaq.kernel` \u002F `__qpu__` marks a quantum kernel - compiled to Quake MLIR\n- `cudaq.qvector(N)` allocates N qubits in |0⟩\n- `cudaq.sample()` - kernel measures qubits; returns bitstring histogram\n  (`SampleResult`)\n- `cudaq.run()` - kernel returns a classical value; runs `shots_count` times\n  and returns a list of those return values\n- `cudaq.observe()` - computes expectation value ⟨H⟩ for a spin operator\n- `cudaq.get_state()` - returns the full statevector (simulator only)\n\nKernel restrictions\n\n- Only a restricted Python subset is valid inside a kernel - it compiles to\n  Quake MLIR, not regular Python.\n- NumPy and SciPy cannot be used inside a kernel. Use them outside the kernel\n  for classical pre\u002Fpost-processing.\n- Kernels can call other kernels; the callee must also be a `@cudaq.kernel`.\n\nFor compiler internals (`inspect` module -> `ast_bridge.py` -> Quake MLIR ->\nQIR -> JIT), route to `\u002Fcudaq-compiler`.\n\n---\n\n## GPU Simulation\n\nTo recommend the best simulation backend for the user, consult the full\ncomparison table at\n\u003Chttps:\u002F\u002Fnvidia.github.io\u002Fcuda-quantum\u002Flatest\u002Fusing\u002Fbackends\u002Fsimulators.html>\n\n### Available GPU Targets\n\n| Target | Description | Use when |\n|---|---|---|\n| `nvidia` (default) | Single-GPU state vector via cuStateVec (up to ~30 qubits) | Default choice for most simulations on a single GPU |\n| `nvidia --target-option fp64` | Double-precision single GPU | Higher numerical precision needed (e.g. chemistry, sensitive observables) |\n| `nvidia --target-option mgpu` | Multi-GPU, pools memory across GPUs (>30 qubits) | Circuit exceeds single-GPU memory; requires MPI |\n| `nvidia --target-option mqpu` | Multi-QPU, one virtual QPU per GPU, parallel execution | Running many independent circuits in parallel (e.g. parameter sweeps, VQE gradients) |\n| `tensornet` | Tensor network simulator | Shallow or low-entanglement circuits; qubit count exceeds statevector feasibility |\n| `qpp-cpu` | CPU-only fallback (OpenMP) | No GPU available; macOS; small circuits for testing |\n\n---\n\n## QPU\n\nWhen the user invokes this section, do not dump all providers at once.\nInstead, follow this two-step dialogue:\n\nStep 1 - ask which technology they want\n\n```text\nWhich QPU technology are you targeting?\n  1. Ion trap       (IonQ, Quantinuum)\n  2. Superconducting (IQM, OQC, Anyon, TII, QCI)\n  3. Neutral atom   (QuEra, Infleqtion, Pasqal)\n  4. Cloud \u002F multi-platform (AWS Braket, Scaleway)\n```\n\nStep 2 - once they pick a technology, ask which provider, then read the\ncorresponding doc file and walk the user through it step by step.\n\n| Technology | Provider | Doc file |\n|---|---|---|\n| Ion trap | IonQ | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fiontrap.rst` (IonQ section) |\n| Ion trap | Quantinuum | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fiontrap.rst` (Quantinuum section) |\n| Superconducting | IQM | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fsuperconducting.rst` (IQM section) |\n| Superconducting | OQC | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fsuperconducting.rst` (OQC section) |\n| Superconducting | Anyon | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fsuperconducting.rst` (Anyon section) |\n| Superconducting | TII | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fsuperconducting.rst` (TII section) |\n| Superconducting | QCI | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fsuperconducting.rst` (QCI section) |\n| Neutral atom | Infleqtion | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fneutralatom.rst` (Infleqtion section) |\n| Neutral atom | QuEra | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fneutralatom.rst` (QuEra section) |\n| Neutral atom | Pasqal | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fneutralatom.rst` (Pasqal section) |\n| Cloud | AWS Braket | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fcloud\u002Fbraket.rst` |\n| Cloud | Scaleway | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fcloud\u002Fscaleway.rst` |\n\nAfter walking through the provider steps, always close with\n\n- Test locally first with `emulate=True` before submitting to real hardware.\n- Use `cudaq.sample_async()` \u002F `cudaq.observe_async()` for non-blocking submission.\n- Handle provider credentials securely: export them as environment variables\n  in your shell session (or a local profile that is not committed to version\n  control) rather than hardcoding them in source or notebooks. Never paste\n  tokens into shared files, logs, or commits, and prefer a secrets manager\n  where one is available.\n\n---\n\n## Applications\n\nCUDA-Q ships with ready-to-run application notebooks\n\n| Category | Examples |\n|---|---|\n| Optimization | QAOA, ADAPT-QAOA, MaxCut |\n| Chemistry | VQE, UCCSD, ADAPT-VQE |\n| Error Correction | Surface codes, QEC memory |\n| Algorithms | Grover's, Shor's, QFT, Deutsch-Jozsa, HHL |\n| ML | Quantum neural networks, kernel methods |\n| Simulation | Hamiltonian dynamics, Trotter evolution |\n| Finance | Portfolio optimization, Monte Carlo |\n\n---\n\n## Parallelize\n\nCUDA-Q supports two distinct multi-GPU parallelization strategies - pick based\non what you are trying to scale.\n\n| Goal | Strategy | Target option |\n|---|---|---|\n| Single circuit too large for one GPU | Pool GPU memory | `nvidia --target-option mgpu` |\n| Many independent circuits at once | Run circuits in parallel | `nvidia --target-option mqpu` |\n| Large Hamiltonian expectation value | Distribute terms across GPUs | `mqpu` + `execution=cudaq.parallel.thread` |\n\n### Circuit batching with mqpu (`sample_async` \u002F `observe_async`)\n\nThe `mqpu` option maps one virtual QPU to each GPU. Dispatch circuits\nasynchronously with `qpu_id` to all GPUs simultaneously.\n\n```python\nimport cudaq\n\ncudaq.set_target(\"nvidia\", option=\"mqpu\")\nn_qpus = cudaq.get_platform().num_qpus()\n\nfutures = [\n    cudaq.observe_async(kernel, hamiltonian, params, qpu_id=i % n_qpus)\n    for i, params in enumerate(param_sets)\n]\nresults = [f.get().expectation() for f in futures]\n```\n\n### Hamiltonian batching\n\nFor a single kernel with a large Hamiltonian, add `execution=` to\n`cudaq.observe` — no other code change needed.\n\n```python\n# Single node, multiple GPUs\nresult = cudaq.observe(kernel, hamiltonian, *args,\n                       execution=cudaq.parallel.thread)\n\n# Multi-node via MPI\nresult = cudaq.observe(kernel, hamiltonian, *args,\n                       execution=cudaq.parallel.mpi)\n```\n\nSee the docs above for complete working examples of both patterns.\n\n---\n\n## Examples\n\n- `\u002Fcudaq-guide` — print the onboarding menu and ask the user which topic to\n  explore.\n- `\u002Fcudaq-guide install` — walk through installation, defaulting to the Python\n  `pip install cudaq` path, then validate with the Bell state example.\n- `\u002Fcudaq-guide test-program` — build and run a Bell state kernel and confirm\n  the output shows roughly `{ 00:~500 11:~500 }`.\n- `\u002Fcudaq-guide gpu-sim` — recommend a simulation backend (for example\n  `nvidia` for a single GPU, or `nvidia --target-option mgpu` for circuits\n  larger than one GPU's memory).\n- `\u002Fcudaq-guide qpu` — start the two-step QPU dialogue (technology, then\n  provider) and read the matching hardware doc.\n- `\u002Fcudaq-guide parallelize` — choose between `mgpu` (pool memory for one large\n  circuit) and `mqpu` (run many circuits in parallel).\n\n---\n\n## Limitations\n\n- GPU simulation requires Linux (x86_64 or ARM64); macOS is CPU-only\n- Multi-GPU `mgpu` target requires MPI\n- Kernel code must use a restricted Python subset; NumPy\u002FSciPy are not\n  allowed inside kernels\n- QPU access requires provider-specific credentials and accounts\n\n## Troubleshooting\n\n- Import error after `pip install cudaq`: Ensure Python 3.10+ and a\n  supported OS (Linux or macOS)\n- No GPU detected: Verify CUDA Toolkit is installed and `nvidia-smi`\n  shows your GPU; fall back to `qpp-cpu`\n- Kernel compile error: Check that only supported Python constructs are\n  used inside `@cudaq.kernel`\n- QPU submission fails: Confirm credentials are set as environment\n  variables per the provider docs\n","## CUDA-Q Getting Started Guide\n\nYou are a CUDA-Q expert assistant. Use `$ARGUMENTS` with the routing table\nbelow to jump straight to the topic the user needs.\n\n## Purpose\n\nGuide users through the CUDA-Q platform: installation, writing quantum kernels,\nGPU-accelerated simulation, connecting to QPU hardware, and exploring built-in\napplications.\n\n## Prerequisites\n\n- Python 3.10+ (for Python installation path)\n- CUDA Toolkit (for GPU-accelerated targets on Linux; not required on macOS)\n- NVIDIA GPU (optional; CPU-only simulation available via `qpp-cpu`)\n- For C++ path: Linux or WSL on Windows\n- For QPU access: provider-specific credentials and account\n\n## Instructions\n\n- Invoke with `\u002Fcudaq-guide [argument]`\n- If no argument is given, display the full onboarding menu and ask what\n  the user wants to explore\n- Pass an argument from the routing table below to jump directly to that topic\n- Read local CUDA-Q documentation files to answer questions accurately\n\n## References\n\n| Section | Doc file |\n| --- | --- |\n| Install | `docs\u002Fsphinx\u002Fusing\u002Finstall\u002Finstall.rst`, `docs\u002Fsphinx\u002Fusing\u002Fquick_start.rst` |\n| Test Program | `docs\u002Fsphinx\u002Fusing\u002Fbasics\u002Fkernel_intro.rst`, `docs\u002Fsphinx\u002Fusing\u002Fbasics\u002Fbuild_kernel.rst` |\n| GPU Simulation | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fsims\u002Fsvsims.rst`, `docs\u002Fsphinx\u002Fusing\u002Fexamples\u002Fmulti_gpu_workflows.rst` |\n| QPU | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware.rst`, `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fcloud.rst` |\n| Applications | `docs\u002Fsphinx\u002Fusing\u002Fapplications.rst` |\n| Parallelize | `docs\u002Fsphinx\u002Fusing\u002Fexamples\u002Fmulti_gpu_workflows.rst` |\n\n## Routing by Argument\n\n| Argument | Action |\n|---|---|\n| `install` | Walk through installation (see Install section) |\n| `test-program` | Build and run a Bell state kernel to verify CUDA-Q is working properly |\n| `gpu-sim` | Explain GPU-accelerated simulation targets (see GPU Simulation section) |\n| `qpu` | Explain how to run on real QPU hardware (see QPU section) |\n| `applications` | Showcase what can be built with CUDA-Q (see Applications section) |\n| `parallelize` | Show how to run circuits in parallel across multiple QPUs (see Parallelize section) |\n| _(none)_ | Print the full menu below and ask what they'd like to explore |\n\n---\n\n## Full Menu (no argument)\n\nPresent this when invoked with no argument\n\n```text\nCUDA-Q Getting Started\n\nCUDA-Q is NVIDIA's unified quantum-classical programming model for CPUs, GPUs, and QPUs.\nSupports Python and C++. Docs https:\u002F\u002Fnvidia.github.io\u002Fcuda-quantum\u002F\n\nChoose a topic\n  \u002Fcudaq-guide install         Install CUDA-Q (Python pip or C++ binary)\n  \u002Fcudaq-guide test-program    Write and run your quantum kernel\n  \u002Fcudaq-guide gpu-sim         Accelerate simulation on NVIDIA GPUs\n  \u002Fcudaq-guide qpu             Connect to real QPU hardware\n  \u002Fcudaq-guide applications    Explore what you can build\n  \u002Fcudaq-guide parallelize     Run circuits in parallel across multiple QPUs\n```\n\n---\n\n## Install\n\nInstructions\n\n- Default to Python installation unless the user explicitly mentions C++ or\n  the `nvq++` compiler.\n- After installation, always guide the user through the validation step\n  (run the Bell state example and confirm output shows `{ 00:~500 11:~500 }`).\n- Default to GPU-accelerated targets (`nvidia`) unless: the user is on\n  macOS\u002FApple Silicon, mentions no GPU available, or explicitly asks for\n  CPU-only simulation - in those cases use `qpp-cpu`.\n- Do not suggest cloud trial or Launchpad options unless the user has no\n  local environment or asks about cloud access.\n\nPlatform notes\n\n- Linux (x86_64, ARM64): full GPU support -\n  `pip install cudaq` + CUDA Toolkit\n- macOS (ARM64\u002FApple Silicon): CPU simulation only -\n  `pip install cudaq` (no CUDA Toolkit needed)\n- Windows: use WSL, then follow Linux instructions\n- C++ (no sudo):\n  `bash install_cuda_quantum*.$(uname -m) --accept -- --installpath $HOME\u002F.cudaq`\n- Brev (cloud, no local setup): Log in at the NVIDIA Application Hub,\n  open a CUDA-Q workspace, then SSH in with the Brev CLI:\n\n  ```bash\n  brev open ${WORKSPACE_NAME}\n  ```\n\n  CUDA-Q and the CUDA Toolkit are pre-installed.\n\n---\n\n## Test Program\n\nKey concepts to explain\n\n- `@cudaq.kernel` \u002F `__qpu__` marks a quantum kernel - compiled to Quake MLIR\n- `cudaq.qvector(N)` allocates N qubits in |0⟩\n- `cudaq.sample()` - kernel measures qubits; returns bitstring histogram\n  (`SampleResult`)\n- `cudaq.run()` - kernel returns a classical value; runs `shots_count` times\n  and returns a list of those return values\n- `cudaq.observe()` - computes expectation value ⟨H⟩ for a spin operator\n- `cudaq.get_state()` - returns the full statevector (simulator only)\n\nKernel restrictions\n\n- Only a restricted Python subset is valid inside a kernel - it compiles to\n  Quake MLIR, not regular Python.\n- NumPy and SciPy cannot be used inside a kernel. Use them outside the kernel\n  for classical pre\u002Fpost-processing.\n- Kernels can call other kernels; the callee must also be a `@cudaq.kernel`.\n\nFor compiler internals (`inspect` module -> `ast_bridge.py` -> Quake MLIR ->\nQIR -> JIT), route to `\u002Fcudaq-compiler`.\n\n---\n\n## GPU Simulation\n\nTo recommend the best simulation backend for the user, consult the full\ncomparison table at\n\u003Chttps:\u002F\u002Fnvidia.github.io\u002Fcuda-quantum\u002Flatest\u002Fusing\u002Fbackends\u002Fsimulators.html>\n\n### Available GPU Targets\n\n| Target | Description | Use when |\n|---|---|---|\n| `nvidia` (default) | Single-GPU state vector via cuStateVec (up to ~30 qubits) | Default choice for most simulations on a single GPU |\n| `nvidia --target-option fp64` | Double-precision single GPU | Higher numerical precision needed (e.g. chemistry, sensitive observables) |\n| `nvidia --target-option mgpu` | Multi-GPU, pools memory across GPUs (>30 qubits) | Circuit exceeds single-GPU memory; requires MPI |\n| `nvidia --target-option mqpu` | Multi-QPU, one virtual QPU per GPU, parallel execution | Running many independent circuits in parallel (e.g. parameter sweeps, VQE gradients) |\n| `tensornet` | Tensor network simulator | Shallow or low-entanglement circuits; qubit count exceeds statevector feasibility |\n| `qpp-cpu` | CPU-only fallback (OpenMP) | No GPU available; macOS; small circuits for testing |\n\n---\n\n## QPU\n\nWhen the user invokes this section, do not dump all providers at once.\nInstead, follow this two-step dialogue:\n\nStep 1 - ask which technology they want\n\n```text\nWhich QPU technology are you targeting?\n  1. Ion trap       (IonQ, Quantinuum)\n  2. Superconducting (IQM, OQC, Anyon, TII, QCI)\n  3. Neutral atom   (QuEra, Infleqtion, Pasqal)\n  4. Cloud \u002F multi-platform (AWS Braket, Scaleway)\n```\n\nStep 2 - once they pick a technology, ask which provider, then read the\ncorresponding doc file and walk the user through it step by step.\n\n| Technology | Provider | Doc file |\n|---|---|---|\n| Ion trap | IonQ | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fiontrap.rst` (IonQ section) |\n| Ion trap | Quantinuum | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fiontrap.rst` (Quantinuum section) |\n| Superconducting | IQM | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fsuperconducting.rst` (IQM section) |\n| Superconducting | OQC | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fsuperconducting.rst` (OQC section) |\n| Superconducting | Anyon | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fsuperconducting.rst` (Anyon section) |\n| Superconducting | TII | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fsuperconducting.rst` (TII section) |\n| Superconducting | QCI | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fsuperconducting.rst` (QCI section) |\n| Neutral atom | Infleqtion | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fneutralatom.rst` (Infleqtion section) |\n| Neutral atom | QuEra | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fneutralatom.rst` (QuEra section) |\n| Neutral atom | Pasqal | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fhardware\u002Fneutralatom.rst` (Pasqal section) |\n| Cloud | AWS Braket | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fcloud\u002Fbraket.rst` |\n| Cloud | Scaleway | `docs\u002Fsphinx\u002Fusing\u002Fbackends\u002Fcloud\u002Fscaleway.rst` |\n\nAfter walking through the provider steps, always close with\n\n- Test locally first with `emulate=True` before submitting to real hardware.\n- Use `cudaq.sample_async()` \u002F `cudaq.observe_async()` for non-blocking submission.\n- Handle provider credentials securely: export them as environment variables\n  in your shell session (or a local profile that is not committed to version\n  control) rather than hardcoding them in source or notebooks. Never paste\n  tokens into shared files, logs, or commits, and prefer a secrets manager\n  where one is available.\n\n---\n\n## Applications\n\nCUDA-Q ships with ready-to-run application notebooks\n\n| Category | Examples |\n|---|---|\n| Optimization | QAOA, ADAPT-QAOA, MaxCut |\n| Chemistry | VQE, UCCSD, ADAPT-VQE |\n| Error Correction | Surface codes, QEC memory |\n| Algorithms | Grover's, Shor's, QFT, Deutsch-Jozsa, HHL |\n| ML | Quantum neural networks, kernel methods |\n| Simulation | Hamiltonian dynamics, Trotter evolution |\n| Finance | Portfolio optimization, Monte Carlo |\n\n---\n\n## Parallelize\n\nCUDA-Q supports two distinct multi-GPU parallelization strategies - pick based\non what you are trying to scale.\n\n| Goal | Strategy | Target option |\n|---|---|---|\n| Single circuit too large for one GPU | Pool GPU memory | `nvidia --target-option mgpu` |\n| Many independent circuits at once | Run circuits in parallel | `nvidia --target-option mqpu` |\n| Large Hamiltonian expectation value | Distribute terms across GPUs | `mqpu` + `execution=cudaq.parallel.thread` |\n\n### Circuit batching with mqpu (`sample_async` \u002F `observe_async`)\n\nThe `mqpu` option maps one virtual QPU to each GPU. Dispatch circuits\nasynchronously with `qpu_id` to all GPUs simultaneously.\n\n```python\nimport cudaq\n\ncudaq.set_target(\"nvidia\", option=\"mqpu\")\nn_qpus = cudaq.get_platform().num_qpus()\n\nfutures = [\n    cudaq.observe_async(kernel, hamiltonian, params, qpu_id=i % n_qpus)\n    for i, params in enumerate(param_sets)\n]\nresults = [f.get().expectation() for f in futures]\n```\n\n### Hamiltonian batching\n\nFor a single kernel with a large Hamiltonian, add `execution=` to\n`cudaq.observe` — no other code change needed.\n\n```python\n# Single node, multiple GPUs\nresult = cudaq.observe(kernel, hamiltonian, *args,\n                       execution=cudaq.parallel.thread)\n\n# Multi-node via MPI\nresult = cudaq.observe(kernel, hamiltonian, *args,\n                       execution=cudaq.parallel.mpi)\n```\n\nSee the docs above for complete working examples of both patterns.\n\n---\n\n## Examples\n\n- `\u002Fcudaq-guide` — print the onboarding menu and ask the user which topic to\n  explore.\n- `\u002Fcudaq-guide install` — walk through installation, defaulting to the Python\n  `pip install cudaq` path, then validate with the Bell state example.\n- `\u002Fcudaq-guide test-program` — build and run a Bell state kernel and confirm\n  the output shows roughly `{ 00:~500 11:~500 }`.\n- `\u002Fcudaq-guide gpu-sim` — recommend a simulation backend (for example\n  `nvidia` for a single GPU, or `nvidia --target-option mgpu` for circuits\n  larger than one GPU's memory).\n- `\u002Fcudaq-guide qpu` — start the two-step QPU dialogue (technology, then\n  provider) and read the matching hardware doc.\n- `\u002Fcudaq-guide parallelize` — choose between `mgpu` (pool memory for one large\n  circuit) and `mqpu` (run many circuits in parallel).\n\n---\n\n## Limitations\n\n- GPU simulation requires Linux (x86_64 or ARM64); macOS is CPU-only\n- Multi-GPU `mgpu` target requires MPI\n- Kernel code must use a restricted Python subset; NumPy\u002FSciPy are not\n  allowed inside kernels\n- QPU access requires provider-specific credentials and accounts\n\n## Troubleshooting\n\n- Import error after `pip install cudaq`: Ensure Python 3.10+ and a\n  supported OS (Linux or macOS)\n- No GPU detected: Verify CUDA Toolkit is installed and `nvidia-smi`\n  shows your GPU; fall back to `qpp-cpu`\n- Kernel compile error: Check that only supported Python constructs are\n  used inside `@cudaq.kernel`\n- QPU submission fails: Confirm credentials are set as environment\n  variables per the provider docs\n",{"name":5,"tags":24,"title":30,"tools":31,"author":35,"license":15,"version":36,"metadata":37,"description":7,"compatibility":43},[25,26,27,28,29],"cuda-quantum","quantum-computing","onboarding","getting-started","nvidia","Cuda Quantum",[32,33,34],"Read","Glob","Grep","CUDA-Q Team \u003Ccuda-quantum@nvidia.com>","1.0.1",{"tags":38,"author":35,"domain":39,"languages":40},[25,26,27,28,29],"quantum",[41,42],"python","c++","Python 3.10+, C++ 20","main","1c523aba5cdf867a79f078847075492d7778092a","skills\u002Fnvidia\u002Fcudaq-guide",1,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills","https:\u002F\u002Fskills.x402.wtf","https:\u002F\u002Fgithub.com\u002Fthemusebook","https:\u002F\u002Fmusebook.trade","The official Github of musebook","2026-11-02 23:42:26",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add themusebook\u002Fskills --skill cudaq-guide",{"tool":60,"command":61},"bunx","bunx skills add themusebook\u002Fskills --skill cudaq-guide",{"tool":63,"command":64},"pnpm","pnpm dlx skills add themusebook\u002Fskills --skill cudaq-guide","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fcudaq-guide\u002FSKILL.md",true,[68,74,78,82,86,90],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"BENCHMARK.md","REFERENCE","参考文档",3901,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fcudaq-guide\u002FBENCHMARK.md",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"evals\u002Fconfig.yml",962,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fcudaq-guide\u002Fevals\u002Fconfig.yml",{"path":79,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":80,"sourceHtmlUrl":81},"evals\u002FEVAL.md",1981,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fcudaq-guide\u002Fevals\u002FEVAL.md",{"path":83,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":84,"sourceHtmlUrl":85},"evals\u002Fevals.json",5774,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fcudaq-guide\u002Fevals\u002Fevals.json",{"path":87,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":88,"sourceHtmlUrl":89},"skill-card.md",3800,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fcudaq-guide\u002Fskill-card.md",{"path":91,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":94,"sourceHtmlUrl":95},"skill.oms.sig","OTHER","其他",5029,"https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fcudaq-guide\u002Fskill.oms.sig",[97,106,113,120,127,134],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":101,"licenseFileUrl":102,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7AB34SPKVSDRRG009PM1CZH","youtube-clipper","YouTube 视频智能剪辑工具。下载视频和字幕，AI 分析生成精细章节（几分钟级别）， 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频，并生成总结文案。 使用场景：当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词：视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video","MIT","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":101,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M7AB18BH6N7KR7939HRNWVMQ","viem-integration","Integrate EVM blockchains using viem. Use when user says \"read blockchain data\", \"send transaction\", \"interact with smart contract\", \"connect to Ethereum\", \"use viem\", \"use wagmi\", \"wallet integration\", \"viem setup\", or mentions blockchain\u002FEVM development with TypeScript.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fviem-integration\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":101,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M7AB12GHGP48WCNXDQQ9222H","v4-security-foundations","Security-first Uniswap v4 hook development. Use when user mentions \"v4 hooks\", \"hook security\", \"PoolManager\", \"beforeSwap\", \"afterSwap\", or asks about V4 hook best practices, vulnerabilities, or audit requirements.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fv4-security-foundations\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":101,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":19},"01M7AB0XM3PSR7V3Q2ZRR0Q0FB","v4-sdk-integration","App-layer SDK guide for building swap and liquidity experiences directly with the Uniswap v4 SDK. Use when user asks about \"v4 sdk\", \"uniswap v4\", \"v4 swap\", \"v4 liquidity\", \"PoolManager\", \"V4Planner\", \"StateView\", \"PositionManager\", \"pool state\", \"v4 position\", \"uniswap sdk\", or when building swap\u002Fliquidity UX directly with SDKs rather than via the Trading API.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fv4-sdk-integration\u002FSKILL.md",[],[],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":101,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":19},"01M7AB0SGA93ASA588DJW4P9WT","v4-hook-generator","Generate Uniswap v4 hook contracts via OpenZeppelin MCP. Use when building custom swap logic, async swaps, hook-owned liquidity, custom curves, dynamic fees, MEV protection, limit orders, or oracle hooks.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fv4-hook-generator\u002FSKILL.md",[],[],{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":101,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":19},"01M7AAZYH75H4CS03WSW2EZ8DM","testing","For testing with Light Protocol programs and clients on localnet, devnet, and mainnet validation.","https:\u002F\u002Fgithub.com\u002Fthemusebook\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftesting\u002FSKILL.md",[],[]]