Quantum Computing Asked by Marija Scekic on March 7, 2021
How can we get rid of runtime next error:
Traceback (most recent call last):
File "C:UsersMarijaAnaconda3libsite-packagesprojectqtypes_qubit.py", line 135, in __del__
self.engine.deallocate_qubit(weak_copy)
File "C:UsersMarijaAnaconda3libsite-packagesprojectqcengines_basics.py", line 153, in deallocate_qubit
tags=[DirtyQubitTag()] if is_dirty else [])])
File "C:UsersMarijaAnaconda3libsite-packagesprojectqcengines_main.py", line 288, in send
raise compact_exception # use verbose=True for more info
RuntimeError: Qubit has not been measured / uncomputed. Cannot access its classical value and/or deallocate a qubit in superposition!
raised in:
' File "C:\Users\Marija\Anaconda3\lib\site-packages\projectq\backends\_sim\_pysim.py", line 139, in get_classical_value'
' raise RuntimeError("Qubit has not been measured / "'```
By measuring all the qubits at the end of the code, I avoided the above-mentioned error message.
Correct answer by Marija Scekic on March 7, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP