"""Dummies=======This module gathers differnt dummy components that mimic hardware but do nothing. They are mainly used for debuggingatomiq"""from__future__importannotationsfromatomiq.components.primitivesimportComponent,Parametrizable,Measurablefromatomiq.components.electronics.adcimportADCfromatomiq.components.electronics.voltagesourceimportDACfromatomiq.components.electronics.rfsourceimportRFSourcefromartiq.experimentimportkernelfromartiq.language.coreimportnow_mufromartiq.language.typesimportTFloat,TArray,TInt32
[docs]classDummyRFSource(RFSource):"""A dummy RFSource used for debugging """@kerneldef_set_frequency(self,frequency):self.frequency=frequencyself.experiment.log.info(self.identifier+": Set frequency to {0:.0f} MHz",[frequency/1e6])@kerneldef_set_amplitude(self,amplitude):self.amplitude=amplitudeself.experiment.log.info(self.identifier+": Set amplitude to {0:.3f}",[amplitude])@kerneldef_set_phase(self,phase):self.phase=phaseself.experiment.log.info(self.identifier+": Set phase to {0}/pi",[phase/3.14])