Enable parallel distribution for tensornet and tensornet-mps
Open
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
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.
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