Anders and Briegel in Python
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

25 řádky
637B

  1. from abp import GraphState
  2. from tqdm import tqdm
  3. import mock
  4. REPEATS = 1000
  5. def test_stabilizers_against_anders_and_briegel(n=10):
  6. """ Test that stabilizers are line-for-line equivalent """
  7. for i in list(range(REPEATS)):
  8. c = mock.random_stabilizer_circuit(n)
  9. g = mock.AndersWrapper(list(range(n)))
  10. g.act_circuit(c)
  11. da = g.get_full_stabilizer().to_dictionary()
  12. g = mock.ABPWrapper(list(range(n)))
  13. g.act_circuit(c)
  14. db = g.to_stabilizer().to_dictionary()
  15. assert da == db
  16. def test_stabilizer_access():
  17. g = GraphState(3)
  18. print(g.to_stabilizer()[0, 0])