mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-24 21:41:46 +02:00
It seem the Second 64 is always 0 in psi_det
This commit is contained in:
parent
fa2499bc4e
commit
3f38c8a81c
@ -331,22 +331,30 @@ for c, (l_det_bit_alpha, l_det_bit_beta) in zip(psi_coef, psi_det):
|
|||||||
print c
|
print c
|
||||||
|
|
||||||
bin_det = ""
|
bin_det = ""
|
||||||
for i,int_det in enumerate(l_det_bit_alpha):
|
int_det = l_det_bit_alpha[0]
|
||||||
bin_det_raw = "{0:b}".format(int_det)[::-1]
|
bin_det_raw = "{0:b}".format(int_det)[::-1]
|
||||||
if mo_num - 64*(i+1) > 0:
|
bin_det += bin_det_raw + "0" * (mo_num - len(bin_det_raw))
|
||||||
bin_det += bin_det_raw + "0" * (64*(i+1) - len(bin_det_raw))
|
|
||||||
else:
|
# for i,int_det in enumerate(l_det_bit_alpha):
|
||||||
bin_det += bin_det_raw + "0" * (mo_num-64*i - len(bin_det_raw))
|
# bin_det_raw = "{0:b}".format(int_det)[::-1]
|
||||||
|
# if mo_num - 64*(i+1) > 0:
|
||||||
|
# bin_det += bin_det_raw + "0" * (64*(i+1) - len(bin_det_raw))
|
||||||
|
# else:
|
||||||
|
# bin_det += bin_det_raw + "0" * (mo_num-64*i - len(bin_det_raw))
|
||||||
|
|
||||||
print bin_det
|
print bin_det
|
||||||
|
|
||||||
bin_det = ""
|
bin_det = ""
|
||||||
for i,int_det in enumerate(l_det_bit_beta):
|
int_det = l_det_bit_beta[0]
|
||||||
bin_det_raw = "{0:b}".format(int_det)[::-1]
|
bin_det_raw = "{0:b}".format(int_det)[::-1]
|
||||||
if mo_num - 64*(i+1) > 0:
|
bin_det += bin_det_raw + "0" * (mo_num - len(bin_det_raw))
|
||||||
bin_det += bin_det_raw + "0" * (64*(i+1) - len(bin_det_raw))
|
|
||||||
else:
|
# for i,int_det in enumerate(l_det_bit_beta):
|
||||||
bin_det += bin_det_raw + "0" * (mo_num-64*i - len(bin_det_raw))
|
# bin_det_raw = "{0:b}".format(int_det)[::-1]
|
||||||
|
# if mo_num - 64*(i+1) > 0:
|
||||||
|
# bin_det += bin_det_raw + "0" * (64*(i+1) - len(bin_det_raw))
|
||||||
|
# else:
|
||||||
|
# bin_det += bin_det_raw + "0" * (mo_num-64*i - len(bin_det_raw))
|
||||||
|
|
||||||
print bin_det
|
print bin_det
|
||||||
print ""
|
print ""
|
||||||
|
Loading…
Reference in New Issue
Block a user