Anders and Briegel in Python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
735B

  1. from numpy import *
  2. import json
  3. #json.load(open("anders_
  4. #i = matrix(eye(2, dtype=complex))
  5. #h = matrix([[1, 1], [1, -1]], dtype=complex) / sqrt(2)
  6. #p = matrix([[1, 0], [0, 1j]], dtype=complex)
  7. #s_set = [i, p, p*p, p*p*p]
  8. #s_names = ["i", "p", "pp", "ppp"]
  9. #c_set = [i, h, h*p, h*p*p, h*p*p*p, h*p*p*h]
  10. #c_names = ["i", "h", "hp", "hpp", "hppp", "hpph"]
  11. #names = []
  12. #matrices = []
  13. #for s, s_name in zip(s_set, s_names):
  14. #for c, c_name in zip(c_set, c_names):
  15. #names.append(s_name+c_name)
  16. #matrices.append(s*c)
  17. #print " ".join(names)
  18. #print len(names)
  19. #for m in matrices:
  20. # print (m/abs(amax(m))).round(0).reshape(4)
  21. #print average(abs(array((m/abs(amax(m))).round(0).reshape(4).tolist()[0])))