Anders and Briegel in Python
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011
  1. import chp
  2. import numpy as np
  3. chp.init(5)
  4. chp.act_hadamard(0)
  5. chp.act_cnot(0, 1)
  6. chp.act_phase(0)
  7. for key, value in chp.get_ket().items():
  8. print bin(key), np.exp(1j * value * np.pi/2).round(2)