Example #1
0
 def test_contract_with_bad_effect(self):
     self.model.povms['Mdefault'] = UnconstrainedPOVM(
         [('0', [100.0, 0, 0, 0])],
         evotype='default')  # E eigvals all > 1.0
     result = contract(self.model, self.target, **self.options)
     # TODO assert correctness
     self.model.povms['Mdefault'] = UnconstrainedPOVM(
         [('0', [-100.0, 0, 0, 0])], evotype='default')  # E eigvals all < 0
     result = contract(self.model, self.target, **self.options)
Example #2
0
 def test_contract_raises_on_bad_target(self):
     with self.assertRaises(ValueError):
         contract(self.model, "foobar")
Example #3
0
 def test_contract(self):
     result = contract(self.model, self.target, **self.options)