Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Performance] cuTN circuit2einsum slower than opt_einsum

Aperta
#90 5 commenti 0 reazioni 2 assegnatari Vedi su GitHub

@haidarazzam ci sta già lavorando.

Dal 26/9/2023.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug invalid triage
Discussed in https://github.com/NVIDIA/cuQuantum/discussions/53

Originally posted by rht May 12, 2023
I was benchmarking cuTensorNet and opt_einsum on the QFT and QAOA circuit, and I found the former to be consistently slower than the latter.
I used the same code in https://github.com/NVIDIA/cuQuantum/discussions/23 for cuTensorNet, and for opt_einsum:

bitstring = "0" * len(qubits)
# https://optimized-einsum.readthedocs.io/en/stable/autosummary/opt_einsum.contract_path.html#opt_einsum.contract_path
expression, operands = myconverter.amplitude(bitstring=bitstring)
tic = time.time()
path, path_info = oe.contract_path(expression, *operands)
elapsed1 = time.time() - tic
print("Elapsed opt_einsum path finding", elapsed1)
tic = time.time()
output = oe.contract(expression, *operands, optimize=path)
elapsed2 = time.time() - tic
print("Elapsed opt_einsum contract", elapsed2)

Plot for QFT:
benchmark

I think it has something to do with cuTensorNet's path finding being closer to the global optimum. Is there a way to tweak the hyperoptimizer to either stop early, or to have a larger error tolerance, so as to minimize the overall time?

Lingua principale
Jupyter Notebook
Stelle
502
Fork
102
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA/cuQuantum

Tutte le issue di NVIDIA/cuQuantum

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.