Exemple #1
0
 def test_do_mc2gst_raises_on_out_of_memory(self):
     with self.assertRaises(MemoryError):
         core.do_mc2gst(self.ds,
                        self.mdl_clgst,
                        self.lsgstStrings[0],
                        minProbClipForWeighting=1e-4,
                        probClipInterval=(-1e6, 1e6),
                        memLimit=0)
Exemple #2
0
 def test_do_mc2gst_raises_on_conflicting_spec(self):
     with self.assertRaises(AssertionError):
         core.do_mc2gst(self.ds,
                        self.mdl_clgst,
                        self.lsgstStrings[0],
                        minProbClipForWeighting=1e-4,
                        probClipInterval=(-1e6, 1e6),
                        regularizeFactor=1e-3,
                        cptp_penalty_factor=1.0)
Exemple #3
0
 def test_do_mc2gst_SPAM_penalty_factor(self):
     mdl_lsgst = core.do_mc2gst(self.ds,
                                self.mdl_clgst,
                                self.lsgstStrings[0],
                                minProbClipForWeighting=1e-4,
                                probClipInterval=(-1e6, 1e6),
                                spam_penalty_factor=1.0)
Exemple #4
0
 def test_do_mc2gst_regularize_factor(self):
     mdl_lsgst = core.do_mc2gst(self.ds,
                                self.mdl_clgst,
                                self.lsgstStrings[0],
                                minProbClipForWeighting=1e-4,
                                probClipInterval=(-1e6, 1e6),
                                regularizeFactor=1e-3)
Exemple #5
0
    def test_do_mc2gst_alias_model(self):
        aliased_list = [
            Circuit([(x if x != Label("Gx") else Label("GA1")) for x in mdl])
            for mdl in self.lsgstStrings[0]
        ]
        aliased_model = self.mdl_clgst.copy()
        aliased_model.operations['GA1'] = self.mdl_clgst.operations['Gx']
        aliased_model.operations.pop('Gx')

        mdl_lsgst = core.do_mc2gst(
            self.ds,
            aliased_model,
            aliased_list,
            minProbClipForWeighting=1e-4,
            probClipInterval=(-1e6, 1e6),
            opLabelAliases={Label('GA1'): Circuit(['Gx'])})
Exemple #6
0
 def test_do_mc2gst(self):
     mdl_lsgst = core.do_mc2gst(self.ds,
                                self.mdl_clgst,
                                self.lsgstStrings[0],
                                minProbClipForWeighting=1e-4,
                                probClipInterval=(-1e6, 1e6))