Closed JerryChen97 closed 1 day ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.65%. Comparing base (
aae481a
) to head (939e26e
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Instead of directly adding to the old
DefaultMixed
class, can you leave the old one as is and create a new class calledDefaultMixedNewAPI
that extends the new device API? Once the new device is ready, we can rename it toDefaultMixed
and remove the oldDefaultMixed
class. This would be a lot cleaner.
This is exactly what I thought in the very beginning. Let me create another branch along with a new PR to implement this. After the new class is established I rebase this PR to it
@albi3ro do we have any other concerns for now?
Context: Updated: to lower the risk of breaking any current workflow, we put all the following-up implementation hooked with a new helper class
default_mixed.DefaultMixedNewAPI
.In the implementation of new device API for
default_mixed
, the methodpreprocess
is for literally preprocess of execution configuration. Specifically, this method should take input aExecutionConfig
, add validations for wires, measeruments and observables, and decompose transform inside itself, and finally return a tuple containing firstly the transform program and secondly the preprocessed config.Description of the Change:
default_mixed.DefaultMixedNewAPI.preprocess
default_mixed.DefaultMixedNewAPI._setup_execution_config
default_qutrit_mixed
default_mixed.DefaultMixedNewAPI.__init__
such that it is more consistent udner the new API standard. (further improvement is needed, e.g. change the base class to Device, but right now let's slow down to avoid potential conflicts).Benefits: One crucial step towards new API of mixed dev
Possible Drawbacks:
__init__
preprocess
Related GitHub Issues: [sc-78674]