-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Compiler Redo #1856
Merged
Merged
Compiler Redo #1856
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jaygambetta
requested review from
1ucian0,
ajavadia,
atilag,
delapuente,
diego-plan9,
ewinston,
kdk,
mtreinish,
nonhermitian and
taalexander
as code owners
February 24, 2019 16:30
Great. It fixes #883 too. |
1ucian0
reviewed
Feb 25, 2019
I'm moving this discussion to an issue and adding https://github.com/Qiskit/qiskit-terra/wiki/Terra-high-level-workflow-API. |
why close this? this already does most of the things, so we can pull request into this branch with any possible changes. |
ajavadia
reviewed
Mar 3, 2019
Co-Authored-By: jaygambetta <[email protected]>
Co-Authored-By: jaygambetta <[email protected]>
Co-Authored-By: jaygambetta <[email protected]>
Co-Authored-By: jaygambetta <[email protected]>
ajavadia
approved these changes
Mar 11, 2019
I'm merging this and will follow up with a clean up of transpile so that TranspileConfig doesn't take a |
lia-approves
pushed a commit
to edasgupta/qiskit-terra
that referenced
this pull request
Jul 30, 2019
* Compiler redo * Compiler redo * More changes * Linting * Linting * Update qiskit/compiler/synthesizer.py Co-Authored-By: jaygambetta <[email protected]> * Update qiskit/compiler/assembler.py Co-Authored-By: jaygambetta <[email protected]> * Update qiskit/compiler/assembler.py Co-Authored-By: jaygambetta <[email protected]> * Update qiskit/runner_wrapper.py Co-Authored-By: jaygambetta <[email protected]> * Renaming for ali * Cleaning up * Listing. And doc * Making compile work with pass manager. * Style fixes * Moving around * Limiting and passing * naming * Doctoring * rename assemble() to assemble_circuits(), update warning messages * add a changelog * add qobj_header as an arg to execute() as well * move schema to models folder like other qiskit components * add tests for assembler * qiskit.compiler.transpile -> qiskit.compiler.transpiler * update teleport example * update rippleadd example * fix misleading try-except statements in the examples * update level 1 example to be transpile then assemble * bring run_config arg to second position in assemble_circuits() * remove compile from tests and a bunch of pylint ignores
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #978
Fixes #1716
Deprecated
execute
,compile
andcircuits_to_qobj
and replaced withexecute_circuits
,transpire
andassemble_circuits
.edit (Ali):
execute()
remains and wrapsexecute_circuits()
, to limit changes.assemble_circuits
takes a list of circuits and makes a qobj. It uses arun_config
to make it and supports an additionalqobj_header
for additional header input. See below and allows #1716 to work. The name change is because it is not a conversion like implied withcircuits_to_qobj
transpile
takes a list of circuits and atranspile_config
to make a new set of circuits (this is why it does not replace compile and is different to the old transpile). This is the ugly code at the moment but we need to rework the transpiler to make it cleaner.execute_circuits
takes a list of circuits, a backend, arun_config
, atranspile_config
and aqobj_header
to simplify running the circuits on a backend.The deprecated functions are made to call the new functions.
For example for #1716
Then to get the description use
or
@nonhermitianI know you wanted
job.description
but I wonder if this is ok as the search function can call this.concerns
@ajavadiaI do like having objects but in a wrapper, I wonder if for the user of run_circuits a list long inputs is prefered so for the wrapper user they don't have to make the objects (
transpile_config
,user_qobj_header
, andrun_config
) to run the circuits.Todo
[ ] clean up the transpile code (synthesis part).
[x] need to give examples
[x] need to make some more test
[ ] give some optional values to transpile_config could not do this with the backend getting hacked into it.
Follow up PR1
I would be to replace
qobj_to_circuits
with a function that returns the circuits and therun_config
, and auser_qobj_header
.I imagine it is something like
follow up PR2
A function to simplify getting the options for the compiler.
follow up PR3
A function to simplify updating a qobj_runconfig
follow up PR4
decide on how to address #1714.