Open cogig opened 5 years ago
Hello!
Can you tell me what circuit you were trying to run?
The circuit image size is oversize and worrisome.After i remove all "reset" operation,it works well.But in my circuit ,"reset" operation is very import .How can I fix the error?
Is there a temporary solution to fix the problem?
Is it possible to do the reset operations once you have got the results?
Okay, I will try add the resets, give me a few minutes
@adamisntdead In our project,the number of quantum circuit is our primary consideration.So the reutilization of quantum circuit is very import.
Sorry, can you rephrase?
Oh,many thanks.
Okay, can you try installing both this module and qcgpu from source? I am away from my computer (this is on an iPad)so I don’t want to release until I add and run tests.
Ok,you can establish a new branch.
It should be on master
After I removed old packages,I cloned the both qiskit-qcgpu-provider and qcgpu to home and installed the two packages successfully by "python3 setup.py install --user".The same error take place when i add "reset" operation to the circuit.There may be something wrong by my incorrect operation.But I can't dope out a solution to the problem.
I also tried pip3 install https://github.com/qcgpu/qcgpu ,but it doesn't take effect.
# In[3]:
import numpy as np
from qiskit.tools.visualization import plot_histogram
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import execute, BasicAer
from qiskit_qcgpu_provider import QCGPUProvider
# In[4]:
col=2
state=6
reg_counts = 10
qr = QuantumRegister(reg_counts, 'qr')
cr = ClassicalRegister(reg_counts, 'cr')
circuit = QuantumCircuit(qr)
measurement_circuit=QuantumCircuit(cr)
for i in range(col, state):
circuit.h(qr[i])
circuit.ccx(qr[8],qr[9],qr[0])
circuit.cx(qr[8],qr[1])
# In[5]:
circuit.reset(qr[6])
# In[6]:
Provider = QCGPUProvider()
circuit.add_register(cr)
circuit.measure(qr,cr)
print("QCGPU backends: ", Provider.backends())
backend_sim = Provider.get_backend('qasm_simulator')
job_sim = execute(circuit, backend_sim)
result_sim = job_sim.result()
counts=result_sim.get_counts(circuit)
counts
all_lst=list(counts.keys())
all_lst
If deleting the line that contains "reset" operation ,the error will fade away and you can check the code
Okay, I will have a look at this tonight