jcmgray / quimb

A python library for quantum information and many-body calculations including tensor networks.
http://quimb.readthedocs.io
Other
455 stars 107 forks source link

Working with large circuit #201

Open RRadgohar opened 9 months ago

RRadgohar commented 9 months ago

What is your issue?

Good day, I'm attempting to tackle the QAOA problem on a sparse graph. The code performs effectively when applied to smaller graphs with N=80 nodes. However, when dealing with a larger graph containing 600 nodes and 1800 edges, I encountered the following error. Can anyone provide assistance in resolving this problem?

Traceback (most recent call last): File /test.py", line 202, in <mod$ circ_ex = qtn.circ_qaoa(terms, p, gammas, betas)

File "/test.py", line 122, in circ$ circ.apply_gates(gates) File /ENVquimb/lib/python3.9/site-packages/quimb/tensor/circuit$ self.apply_gate(*gate) File /ENVquimb/lib/python3.9/site-packages/quimb/tensor/circuit$ self._apply_gate(gate, gate_opts) File /ENVquimb/lib/python3.9/site-packages/quimb/tensor/circuit$ self.psi.gate(gate.array, gate.qubits, tags=tags, opts) File "/ ENVquimb/lib/python3.9/site-packages/quimb/tensor/tensor_$ tn.gateinds( File /ENVquimb/lib/python3.9/site-packages/quimb/tensor/tensor_$ dims = [tn.indsize(ix) for ix in inds] File "/ENVquimb/lib/python3.9/site-packages/quimb/tensor/tensor$ dims = [tn.indsize(ix) for ix in inds] File /ENVquimb/lib/python3.9/site-packages/quimb/tensor/tensor$ tid = next(iter(self.ind_map[ind])) KeyError: 'k100'

jcmgray commented 9 months ago

Hi @RRadgohar, it's hard to tell anything just from the error, maybe you could post a minimal working example?