NVIDIA / NVIDIA/cuda-quantum

Enable parallel distribution for tensornet and tensornet-mps

Open
#2,326 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Required prerequisites
  • Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.
Describe the feature

Hamiltonian batching workflows do not work on the tensornet and tensornet-mps backend. We need to add a mqpu version of those I believe.

import cudaq
from cudaq import spin

# cudaq.set_target("nvidia", option="mqpu")
cudaq.set_target('tensornet')
# cudaq.set_target('tensornet-mps')

cudaq.mpi.initialize()

qubit_count = 15
term_count = 100

kernel = cudaq.make_kernel()
qubits = kernel.qalloc(qubit_count)
kernel.h(qubits[0])
for i in range(1, qubit_count):
    kernel.cx(qubits[0], qubits[i])

hamiltonian = cudaq.SpinOperator.random(qubit_count, term_count)

result = cudaq.observe(kernel, hamiltonian, execution=cudaq.parallel.thread).expectation()

cudaq.mpi.finalize()
RuntimeError: The current quantum_platform does not support parallel distribution of observe() expectation value computations.

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

Reproduce the failure with the Python example using cudaq.observe(), cudaq.parallel.thread, and the tensornet or tensornet-mps target. Trace how the current quantum_platform handles parallel distribution and compare it with the commented nvidia mqpu target. Done means Hamiltonian batching works on both targets without the reported RuntimeError, with coverage for the supported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
backend, distributed-systems
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.