def test_two_qubit_rb_seq(self): p = rb_oql.randomized_benchmarking([2, 0], platf_cfg=config_fn, nr_cliffords=[1, 5], nr_seeds=1, cal_points=False) self.assertEqual(p.name, 'randomized_benchmarking')
def test_two_qubit_rb_seq_interleaved_idle(self): p = rb_oql.randomized_benchmarking([2, 0], platf_cfg=self.config_fn, nr_cliffords=[1, 5], nr_seeds=1, cal_points=False, interleaving_cliffords=[100_000], flux_allocated_duration_ns=60, ) self.assertEqual(p.name, 'randomized_benchmarking')
def test_single_qubit_rb_seq(self): p = rb_oql.randomized_benchmarking([0], platf_cfg=self.config_fn, nr_cliffords=[1, 5], nr_seeds=1, cal_points=False) self.assertEqual(p.name, 'randomized_benchmarking') hashes_fn = p.filename + ".hashes" if os.path.isfile(hashes_fn): # Remove the hashes file to make sure the next test runs correctly os.remove(hashes_fn)
def test_rb_recompilation_needed_hash_based(self): """ [2020-07-22 Victor] Checking for required recompilation of RB sequences was changed to a hash-based scheme """ p = rb_oql.randomized_benchmarking([0], platf_cfg=self.config_fn, nr_cliffords=[1, 5], nr_seeds=1, cal_points=False) hashes_fn = p.filename + ".hashes" assert os.path.isfile(hashes_fn) hashes_dict = None with open(hashes_fn) as json_file: hashes_dict = json.load(json_file) # Hash for the python code that generates the RB assert any("clifford_rb_oql.py" in key for key in hashes_dict.keys()) # Hash for the OpenQL configuration file assert any("cfg" in key for key in hashes_dict.keys())
def test_single_qubit_rb_seq(self): p = rb_oql.randomized_benchmarking([0], platf_cfg=config_fn, nr_cliffords=[1, 5], nr_seeds=1, cal_points=False)
def test_two_qubit_rb_seq_interleaved(self): p = rb_oql.randomized_benchmarking([2, 0], platf_cfg=self.config_fn, nr_cliffords=[1, 5], nr_seeds=1, cal_points=False, interleaving_cliffords=[104368]) self.assertEqual(p.name, 'randomized_benchmarking')