iqm target (emulate): specific pair of exp_pauli terms takes >4 h at 22 qubits (dense multi-qubit block in qpp::applyCTRL); each term alone ~2 min
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- backend, performance
Research direction
Run the provided 22-qubit Python reproducer on the iqm target with emulate=True and compare the two-term and single-term timings. Start at qpp::applyCTRL and the lowering of exp_pauli terms, using the reported perf profile and dense-block behavior as guides. Done means the pair executes in roughly the sibling-pair time or degrades gracefully without the oversized dense operation.
Written by the indexing model from the issue text.
Description
Required prerequisites
- Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
- If possible, make a PR with a failing test to give us a starting point to work on!
Describe the bug
On the iqm target with emulate=True, sampling a 22-qubit kernel that applies two specific weight-4 exp_pauli terms takes over 4 hours, while each term alone, and seven other two-term circuits of the same shape, take about 2 minutes. The cost is shot-independent (100 and 5000 shots grind identically). The same kernel and arguments run in seconds on the nvidia and qpp-cpu targets.
perf on the live process shows 98.4% of cycles in qpp::applyCTRL (libnvqir-dm.so), and the flat ~8.7 GB RSS matches a dense complex<double> operator over ~14-15 qubits (2^29 x 16 B). So the lowering appears to fuse this particular pair into one very large dense block that is then applied elementwise, instead of the usual small-gate decomposition. Shot-independence follows: the state is prepared once, sampling is cheap.
Steps to reproduce the bug
import cudaq
# needs a valid IQM_TOKEN + network for the architecture fetch, even in emulate mode
cudaq.set_target("iqm", url="https://cocos.resonance.meetiqm.com/emerald", emulate=True)
@cudaq.kernel
def kernel(n_qubits: int, n_electrons: int, coeffs: list[float], words: list[cudaq.pauli_word]):
q = cudaq.qvector(n_qubits)
for i in range(n_electrons):
x(q[i])
for i in range(len(coeffs)):
exp_pauli(coeffs[i], q, words[i])
words = [cudaq.pauli_word(w) for w in [
"IIIIIIIIIIIIIIIIIIIIII",
"IIIIXIIIIXIIIIYIIIIIIX", # ~2 min alone
"XIIIIIIIIIIIXIIIYIXIII", # ~2 min alone; the pair grinds > 4 h
]]
coeffs = [1.0, 0.000178, 0.000815]
cudaq.sample(kernel, 22, 14, coeffs, words, shots_count=100)
Expected behavior
The pair should execute in roughly the same ~2 minutes as its sibling pairs, or degrade gracefully.
Is this a regression? If it is, put the last known working version (or commit) here.
Unknown (observed on 0.14.0; other versions not tested).
Environment
- CUDA-Q version: cuda-quantum-cu12 0.14.0 (pip)
- Python version: 3.11
- C++ compiler: n/a (pip wheel)
- Operating system: Rocky Linux 8, CPU-only node
Suggestions
Can share timing logs and further reproducer variants if useful.
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 508
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 100
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/cuda-quantum
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
NVIDIA/cuda-quantum#6035 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 77/100
NVIDIA/cuda-quantum#6034 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-quantum#6033 ·
Maintainers usually reply within 1 day
-
Point the CUDA-Q Pulse research preview docs to the released cudaq-pulse packagePossibly taken @fedonman claimed this 2 days ago. Open
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
NVIDIA/cuda-quantum#6031 ·
Maintainers usually reply within 1 day
-
Realtime fnv1a_hash sign-extends char, so a non-ASCII handler name gets a platform-dependent function idPossibly taken @fedonman claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
NVIDIA/cuda-quantum#6029 ·
Maintainers usually reply within 1 day
All issues in NVIDIA/cuda-quantum
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 2 days
-
bug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ClickHouse/clickhouse-cpp#645 ·
Maintainers usually reply within 1 day
-
bug compatibility difficulty:easy prio:normal
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NatronGitHub/openfx-misc#524 ·
Maintainers usually reply within 1 day
-
documentation enhancement help wanted P0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#359 ·
Maintainers usually reply within 1 day
-
Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openscad/openscad#7360 · 2 comments ·
Maintainers usually reply within 1 day