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
I assume you have installed ProjectQ v0.3.6 or below via pypi in that case the examples and documention of the master branch are valid.
In the meantime, we have introduced get_engine_list in the develop branch. This minor change unfortunately makes the new example codes not run with the previous version. On the plus side, this then allows to use our new setups discussed in the compiler_tutorial and the new setups with mappers #243
As IBM has changed some of their chip layout since the release of ProjectQ v0.3.6, you currently need to install the latest version from the develop branch (download repo, in the top directory python -m pip install --user .) The new version 0.4 of ProjectQ is almost done and will be uploaded to pypi in the next days. (Waiting for #241 to be integrated)
import projectq.setups.ibm
from projectq.ops import H, Measure
from projectq import MainEngine
from projectq.backends import IBMBackend
create a main compiler engine
eng = MainEngine()
eng = MainEngine(IBMBackend(),
engine_list=projectq.setups.ibm.get_engine_list())
allocate one qubit
q1 = eng.allocate_qubit()
put it in superposition
H | q1
measure
Measure | q1
eng.flush()
print the result:
print("Measured: {}".format(int(q1)))
The text was updated successfully, but these errors were encountered: