You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the important features in the Qiskit Expeirments is the result data management through the Experiment service. We have local implementation of this in qiskit_experiments.test.fake_service, however, the implementation details are different in many places from one by IBM.
Apart from this, current fake service doesn't implement serialization and deserialization mechanism (it just stores raw data in the data frame). Form the local client viewpoint handling of data behind the scene doesn't matter, however, for the unit test purpose this could produce different situation from the online service.
This makes me think we need to promote the fake service to the qiskit_experiments.database_service.local_service so that the end users and test agent can reliably use (note that IBM service also implements local mode, but this is not necessary in my opinion). To achieve this, we need to define the protocol (or abstract service class) in this package, and let IBM project rewrite their service class based off of the protocol. Qiskit Expeirment should implement reliable local service as a reference implementation. This resembles the Qiskit Backend model / Qiskit IBM Backend.
The text was updated successfully, but these errors were encountered:
As discussed in the meeting, it would be good to have the same type of abstract class for interfacing with the provider so we don't directly edit ExperimentData when provider methods change. @ItamarGoldman
Suggested feature
One of the important features in the Qiskit Expeirments is the result data management through the Experiment service. We have local implementation of this in qiskit_experiments.test.fake_service, however, the implementation details are different in many places from one by IBM.
For example, when you retrieve the data from the service, it returns a list of AnalysisResult object which is implemented in https://github.com/Qiskit-Extensions/qiskit-experiments/blob/32474382ea28e36a7ffe5253d87e1aaa7e0c1a40/qiskit_experiments/framework/experiment_data.py#L1492-L1494
In the IBM service, the result object is created from the data dictionary. This dictionary has two fields
value
and_value
. Non underscore one is a displayed value in the IBM experiment website, which is created from the original data when the result object is created for save https://github.com/Qiskit-Extensions/qiskit-experiments/blob/32474382ea28e36a7ffe5253d87e1aaa7e0c1a40/qiskit_experiments/framework/analysis_result.py#L186-L188while the other is original data serialized and deserialized by our custom JSON encoder and decoder.
This mechanism is not implemented in the fake service, and accessing
_value
value raises the key error (likely this pattern is not tested):https://github.com/Qiskit-Extensions/qiskit-experiments/blob/32474382ea28e36a7ffe5253d87e1aaa7e0c1a40/qiskit_experiments/framework/experiment_data.py#L1505
Apart from this, current fake service doesn't implement serialization and deserialization mechanism (it just stores raw data in the data frame). Form the local client viewpoint handling of data behind the scene doesn't matter, however, for the unit test purpose this could produce different situation from the online service.
This makes me think we need to promote the fake service to the
qiskit_experiments.database_service.local_service
so that the end users and test agent can reliably use (note that IBM service also implements local mode, but this is not necessary in my opinion). To achieve this, we need to define the protocol (or abstract service class) in this package, and let IBM project rewrite their service class based off of the protocol. Qiskit Expeirment should implement reliable local service as a reference implementation. This resembles the Qiskit Backend model / Qiskit IBM Backend.The text was updated successfully, but these errors were encountered: