def __init__(self, data_folder, pulse_name): self.data_folder = data_folder self.pulse_name = pulse_name self.parameters = self.load_json('parameters.json') self.window_mapping = self.load_json('measurement_mapping.json') self.channel_mapping = self.load_json('channel_mapping.json') self.preparation_commands = self.load_json('preparation_commands.json') expected_binary_programs = self.load_json('binary_programs.json') if expected_binary_programs: self.expected_binary_programs = [ PlottableProgram.from_builtin(prog) if prog else None for prog in expected_binary_programs ] else: self.expected_binary_programs = None self.validate_programs = self.load_function_from_file( 'binary_program_validation.py', 'validate_programs') self.validation_data = self.load_json('binary_program_validation.json') self.pulse = None self.program = None self.simulator_manager = None self.hardware_setup = None # type: HardwareSetup self.dac = None # type: DummyDAC self.awg = None # type: TaborAWGRepresentation self.program_AB = None self.program_CD = None
def test_builtint_conversion(self): prog = PlottableProgram(self.segments, self.sequencer_tables, self.adv_sequencer_table) prog = PlottableProgram.from_builtin(prog.to_builtin()) np.testing.assert_equal(self.segments, prog._segments) self.assertEqual(self.sequencer_tables, prog._sequence_tables) self.assertEqual(self.adv_sequencer_table, prog._advanced_sequence_table)
def __init__(self, data_folder, pulse_name): super().__init__(data_folder=data_folder, pulse_name=pulse_name) self.preparation_commands = self.load_json( 'tabor_preparation_commands.json') expected_binary_programs = self.load_json('binary_programs.json') if expected_binary_programs: self.expected_binary_programs = [ PlottableProgram.from_builtin(prog) if prog else None for prog in expected_binary_programs ] else: self.expected_binary_programs = None self.validate_programs = self.load_function_from_file( 'binary_program_validation.py', 'validate_programs') self.validation_data = self.load_json('binary_program_validation.json') self.program_AB = None self.program_CD = None