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

Two compile methods are redundant #1083

Closed
ajavadia opened this issue Oct 10, 2018 · 4 comments · Fixed by #1134
Closed

Two compile methods are redundant #1083

ajavadia opened this issue Oct 10, 2018 · 4 comments · Fixed by #1134
Assignees
Labels
priority: high type: enhancement It's working, but needs polishing
Projects

Comments

@ajavadia
Copy link
Member

What is the expected enhancement?

Currently we have:

  1. wrapper.compile()
def compile(circuits, backend,
            config=None, basis_gates=None, coupling_map=None, initial_layout=None,
            shots=1024, max_credits=10, seed=None, qobj_id=None, hpc=None,
            skip_transpiler=False)
  1. transpiler.compile()
def compile(circuits, backend,
            config=None, basis_gates=None, coupling_map=None, initial_layout=None,
            shots=1024, max_credits=10, seed=None, qobj_id=None, hpc=None,
            pass_manager=None)

The latter should just be removed. The first will have a pass_manager option.

Also see #978 about other simplifications to these function signatures.

@jaygambetta
Copy link
Member

jaygambetta commented Oct 12, 2018

I almost agree but let’s keep it a top-level function. How much is skipped translation used.

@jaygambetta jaygambetta moved this from To do to compile in Transpiler Oct 15, 2018
@jaygambetta jaygambetta self-assigned this Oct 15, 2018
@jaygambetta
Copy link
Member

jaygambetta commented Oct 15, 2018

Ok I'm going to self-assign and work with @nonhermitian on the implementation and it answers his #1032

in the transpiler.compile you pass it circuits it returns compiled circuits

parallel_for():
       circuit -> dag
       dag -> dag
       dag -> circuit

wrapper.comple

compiled_circuits = transpiler.compile(circuits)
qobj = circuits2qobj([compiled_circuits])

Basically, there is no qobj in the transpiler.

@ss2165
Copy link
Contributor

ss2165 commented Nov 8, 2018

@ajavadia I see this issue has been closed but I don't see that compile in _compiler.py has as 'pass_manager' parameter, is this still to come?

The latter should just be removed. The first will have a pass_manager option.

@ajavadia
Copy link
Member Author

ajavadia commented Nov 8, 2018

@ss2165 yes that will replace the skip_transpiler, and if you want to skip the transpiler you just pass in an empty pass manager.
now there are a few follow up issues we are working on to make this all make sense (#1144, #1145, #1146, #1163).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high type: enhancement It's working, but needs polishing
Projects
Transpiler
  
done
Development

Successfully merging a pull request may close this issue.

5 participants