NVIDIA / NVIDIA/cuda-quantum

Library mode should not be the default compilation mode.

Open
#979 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale-notified
Dominant language
C++
Stars
1.1k
Forks
456
Avg merge
1d 22h
Merged PRs (30d)
165

Description

Currently, the default behavior of nvq++ is to compile user code in library mode, i.e., the simple nvq++ <source> -o <exec> will compile <source> in library mode. The problem with this behavior is that this modes allows the user to use the full power of C++ within kernel code---something that is unlikely to be realistic when targeting real quantum devices.

We should create a default emulation target and make the use of the library mode should be a conscious choice by the user, say nvq++ --library-mode <source> -o <exec>, and the compiler should warn the user about its danger: mainly the fact that their kernel might not be able to target real (or emulated) devices.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the nvq++ command-line handling for compilation modes and target selection. Trace how the default mode and library-mode option are chosen, then identify the existing tests or command paths covering these options. Done means ordinary nvq++ compilation uses the emulation target, --library-mode is explicit, and the warning behavior is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.