-
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
The Qobj concept has gotten overly complicated. #1023
Comments
I think the main point here is to try as much as possible to not make Qobj a full-scale class with methods, etc. At this level it should be as close to the serialized json as possible. When we have to, we make methods that consume qobj and spit out other things (circuits, validated bool, another qobj version). This makes sense to me. Also I agree that with result, we can similarly have methods to convert between old/new formats, all within the result folder. The Qobj folder should only be about the payload. |
Lots of things and implications in this issue!
That seems pretty close to what we already have - I'm assuming it was some sort of recap?
It might be a matter of naming or structuring. For context, the So from that point of view, iif for sending a
you can see
If the placement of In the particular case of Going back to Qobj:
This actually seems to be #871?
Actually I think this is one of key problems (also with the results) - there is a lot of cruft that we might be able to remove once we don't have to take into account with the pre-spec formats. As a matter of fact, I would recommend trying to place some effort into making sure that we get every device and sim updated, as hopefully will result in a certain reduction of complexity and facilitate discussion. |
OK, Many points.
My view is
should be
and
should be
This is the main point philosophy Qobj is the object to run not the handler. If we change the input then we change this but if we change the output that goes into results. I want to decouple input and output.
|
After re-reading and the offline discussion, I'm closing the issue in favour or smaller ones:
Please note the discussion was touching many topics, and some might have been missed - wouldn't mind a double-check to make sure nothing went unnoticed! |
I feel the qobj has become larger than what it was intended to be. I want it to be a simple serialization of a list of circuits (an object that is dump that is sent to the api and decoded after). I don't care if it is JSON, binary or email :-)
Basically, it should not exists until we run
and then I don't mind what it is but it does not include results or a results object. It is run on a backend
using
and then it no longer is used and its flow has ended. The Result object (which is a different folder or module) is made by
So my questions are why do we have the _results in the qobj folder. It should not and if we want to have an internal object that handles what is returned by the backend then it lives in the Result folder and used by the result object. I don't want to think of qobj as the new object that handles the API. It is only the input.
I see that we have functions for converting to the old version. Why do we have these? I see the need in the future when we qobj v1 to qobj v2 we should have a conversion, but why can't we, for now, have these as part of the run method in the backend. ie hidden from qiskit terra in the ibm_provider
other things with qobj
convert between versions. Say we make the version 2 and the backend is version 1 where does this happen. I feel this should happen in the dags_2_qobj as qobj is lossy and the backend just uses the schema to check the version it supports. If we need to have some utility functions like qobj1_to_qobj2 etc for versions that we can update then we can have them in tools.
run smart validation see backend.validate(qobj) #1057
The text was updated successfully, but these errors were encountered: