-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
need a disassembler to replace qobj_to_circuits #1952
Comments
Just to clarify, since this is a first issue, am I right in thinking that the goal here is splitting out the run_config and user_qobj_header, not in covering differences in the qobj instruction and Terra circuit API (conditionals, memory/registers, bfuncs, ...) beyond what's already covered by qobj has a superset of the functionality supported by the Terra circuits API, so a general disassembly won't always be trivial. We could limit scope to terra-generated qobj, without conditionals, (effectively what's covered by |
Yes I think you are right. This issue is more about returning all the other stuff (header, config), not only the circuit (as Some things like 'registers' will not have equivalents in the circuit, so I think they may get lost. But I think conditionals are fine no? At least the simple conditionals we have now. |
This commit adds a new dissassembler module that has a single dissasemble function. This is used to take an input qobj and return the circuits, run_config, and user headers which are stored in it. Fixes Qiskit#1952
* Add dissasembler to dissassemble a compiled qobj This commit adds a new dissassembler module that has a single dissasemble function. This is used to take an input qobj and return the circuits, run_config, and user headers which are stored in it. Fixes #1952 * Add tests * Add header asserts * Fix lint * Fix tests * Fix lint * Deprecate qobj_to_circuits * Fix typos * Disable cyclic-import pylint rule This rule is completely broken and often just returns false postives. The latest example can be found here: https://travis-ci.com/Qiskit/qiskit-terra/jobs/194288168 We can just rely on python to catch a cyclic import issues, because it'll raise an error if it's not resolvable. * Revert "Disable cyclic-import pylint rule" This reverts commit 7e614ec. * Update import paths
* Add dissasembler to dissassemble a compiled qobj This commit adds a new dissassembler module that has a single dissasemble function. This is used to take an input qobj and return the circuits, run_config, and user headers which are stored in it. Fixes Qiskit#1952 * Add tests * Add header asserts * Fix lint * Fix tests * Fix lint * Deprecate qobj_to_circuits * Fix typos * Disable cyclic-import pylint rule This rule is completely broken and often just returns false postives. The latest example can be found here: https://travis-ci.com/Qiskit/qiskit-terra/jobs/194288168 We can just rely on python to catch a cyclic import issues, because it'll raise an error if it's not resolvable. * Revert "Disable cyclic-import pylint rule" This reverts commit 7e614ec. * Update import paths
What is the expected enhancement?
We need a function
qiskit.compiler.disassemble()
that takes an assembled qobj and returns the components:Currently we have a converter for this (
qobj_to_circuits
), but this is not really a conversion as the two entities are quite different. So this should be deprecated.The text was updated successfully, but these errors were encountered: