You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When copying a QuantumCircuit with deepcopy, the name of circuit will not be automatically updated.
Thus, the results are wrong trying to get results based on circuit object.
Expected Behavior
The results should be consistent with provided circuit object.
Current Behavior
The results are still based on circuit name rather than circuit object.
Possible Solution
No idea.
Steps to Reproduce (for bugs)
def main():
qr = QuantumRegister(2)
cr = ClassicalRegister(2)
c = QuantumCircuit(qr, cr)
c.x(qr[1])
c2 = copy.deepcopy(c)
c2.x(qr[0])
backend_name ='local_statevector_simulator'
result = q_execute([c, c2], backend_name=backend_name, skip_translation=False)
print(result.get_statevector(c))
print(result.get_statevector(c2))
c and c2 will produce the same statevector.
Your Environment
Version used: master branch
Environment name and version (e.g. Python 3.6.1): 3.6
Operating System and version: macOS, 10.13
The text was updated successfully, but these errors were encountered:
When copying a QuantumCircuit with deepcopy, the name of circuit will not be automatically updated.
Thus, the results are wrong trying to get results based on circuit object.
Expected Behavior
The results should be consistent with provided circuit object.
Current Behavior
The results are still based on circuit name rather than circuit object.
Possible Solution
No idea.
Steps to Reproduce (for bugs)
c
andc2
will produce the same statevector.Your Environment
master
branchThe text was updated successfully, but these errors were encountered: