Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'projectq.setups.ibm' has no attribute 'get_engine_list' #244

Closed
amandeep1988 opened this issue Jul 21, 2018 · 2 comments
Closed

Comments

@amandeep1988
Copy link

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)))

@damiansteiger
Copy link
Contributor

Hi,

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)

@damiansteiger
Copy link
Contributor

The new release of ProjectQ v0.4 is out. Please install that version and everything should work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants