def test_openQL_config_valid(self): test_config_fn = os.path.join(curdir, 'test_gen_cfg_CCL.json') generate_config(filename=test_config_fn, mw_pulse_duration=20, ro_duration=300, init_duration=200000) # If this compiles we conclude that the generated config is valid sqo.AllXY(qubit_idx=0, platf_cfg=test_config_fn) mqo.single_flux_pulse_seq(qubit_indices=(2, 0), platf_cfg=test_config_fn)
def test_openQL_config_valid(self): test_config_fn = os.path.join(curdir, 'test_gen_cfg_CCL.json') generate_config(filename=test_config_fn, mw_pulse_duration=20, ro_duration=300, init_duration=200000) # If this compiles we conclude that the generated config is valid # A single qubit sequence sqo.AllXY(qubit_idx=0, platf_cfg=test_config_fn) # A sequence containing two-qubit gates mqo.single_flux_pulse_seq(qubit_indices=(2, 0), platf_cfg=test_config_fn) # A sequence containing controlled operations sqo.RTE(qubit_idx=0, sequence_type='echo', net_gate='pi', feedback=True, platf_cfg=test_config_fn)
def test_generate_qi_config(self): test_config_fn = os.path.join(curdir, 'test_gen_qi_cfg.json') rot_dict = generate_config_qi(filename=test_config_fn, mw_pulse_duration=20, ro_duration=300, init_duration=200000) # If this compiles we conclude that the generated config is valid # A single qubit sequence sqo.AllXY(qubit_idx=0, platf_cfg=test_config_fn) # A sequence containing two-qubit gates mqo.single_flux_pulse_seq(qubit_indices=(2, 0), platf_cfg=test_config_fn) # conditional sequence does not work because of bad config # # A sequence containing controlled operations # sqo.RTE(qubit_idx=0, # sequence_type='echo', net_gate='pi', feedback=True, # platf_cfg=test_config_fn) print(rot_dict)
def test_single_flux_pulse_seq(self): # N.B. edge 0,2 is still illegal... p = mqo.single_flux_pulse_seq([2, 0], platf_cfg=self.config_fn) self.assertEqual(p.name, 'single_flux_pulse_seq')
def test_single_flux_pulse_seq(self): mqo.single_flux_pulse_seq(qubit_indices=(2, 0), platf_cfg=config_fn)