Anders and Briegel in Python
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

test_measurement.py 397B

123456789101112131415
  1. from abp import GraphState
  2. from anders_briegel import graphsim
  3. def test_z_measurement():
  4. g = GraphState([0])
  5. assert g.measure_z(0, 0) == 0
  6. assert g.measure_z(0, 1) == 1
  7. def test_z_measurement_against_ab():
  8. for i in range(100):
  9. a = graphsim.GraphRegister(1)
  10. b = GraphState()
  11. b.add_node(0)
  12. assert a.measure(0, graphsim.lco_Z) == b.measure(0, "pz")