Hello, I have an experiment that involves multiple classes, with each class having its own kernels. There is a main Class, within which the experiment logic is executed through:
@kernel
def run (self):
xxx
xxx
The question is how can I run the kernels of other Classes from the main Class's "@kernel run()"? Because ARTIQ Python supports a subset of standard Python, errors arise when the main Class' run kernel tries to access other Classes' kernels or functions. I tried to make things dynamic, the kernels of other Classes are dynamic parameters passed in through a list.
For example:
[<reset_all.Reset object at 0x7f9836d60c10>, <doppler_cooling.DopplerCooling object at 0x7f9836d60be0>]
<synthesized>:1:2-1:46: error: cannot unify <instance reset_all.Reset> with <instance doppler_cooling.DopplerCooling>
[`<reset_all.Reset object at 0x7f9836d60c10>`, `<doppler_cooling.DopplerCooling object at 0x7f9836d60be0>`]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
exp/main_experiment.py:34:1: note: expanded from here
def run(self):
^
<synthesized>:1:2-1:46: note: a list element of type <instance reset_all.Reset {
__objectid__: numpy.int32
}>
[`<reset_all.Reset object at 0x7f9836d60c10>`, `<doppler_cooling.DopplerCooling object at 0x7f9836d60be0>`]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<synthesized>:1:48-1:107: note: a list element of type <instance doppler_cooling.DopplerCooling {
__objectid__: numpy.int32
}>
Any comments?
thanks
wenji