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

Change setups #233

Merged
merged 5 commits into from Jul 15, 2018
Merged

Change setups #233

merged 5 commits into from Jul 15, 2018

Conversation

damiansteiger
Copy link
Contributor

Remove setup parameter from MainEngine (has not yet been merged to Master).

This parameter has been introduced to make the compiler engine specifications more explicit instead of just import projectq.setups.ibm. Now it is even more explicit: One needs to set the engine_list parameter:

MainEngine(backend=..., engine_list=projectq.setups.ibm.get_engine_list())

Advantages is that one can give the function get_engine_list parameters, e.g., we can build a compiler engine setup for a linear chain and give it as a parameter the length of the chain:

import projectq.setups.linearchain as linearchain
MainEngine(backend=..., engine_list=linearchain.get_engine_list(num_qubits=8))

Downsides:

  • It takes a bit more of writing but is much more flexible
  • The simplicity of the setup parameter was nice, maybe in future we can use that parameter to set the engine_list and change the default backend in case the user does not provide one (Previously it only set the engine_list)

Other options to this PR:

  • add setup_parameters which should take a dict in order that we can check correct parameter names as each setup might have different ones.
    I.e.
MainEngine(backend=..., setup=projectq.setups.linearchain, setup_params={num_qubits: 8})

Copy link
Contributor

@thomashaener thomashaener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

@damiansteiger damiansteiger merged commit 66bf235 into develop Jul 15, 2018
@damiansteiger damiansteiger deleted the feature/change_setups branch July 15, 2018 11:04
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

Successfully merging this pull request may close these issues.

None yet

2 participants