def test_add_counts_from_dataset(self): gstrs = [('Gx',), ('Gx', 'Gy'), ('Gy',)] oli = np.array([0, 1], 'i') oli_nonstc = [oli, oli, oli] time_nonstc = [np.zeros(2, 'd'), np.zeros(2, 'd'), np.zeros(2, 'd')] reps_nonstc = [10 * np.ones(2, 'i'), 10 * np.ones(2, 'i'), 10 * np.ones(2, 'i')] ds2 = DataSet(oli_nonstc, time_nonstc, reps_nonstc, circuits=gstrs, outcomeLabels=['0', '1']) ds2.add_counts_from_dataset(self.ds)
def test_construct_static(self): ds = DataSet(self.oli_nonstc, self.time_nonstc, self.reps_nonstc, circuitIndices=self.gstrInds_static, outcomeLabels=['0', '1'], bStatic=True) with self.assertRaises(ValueError): ds.add_counts_from_dataset(ds) # can't add to static DataSet