mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-25 05:51:46 +02:00
Filter_connected accelerated
This commit is contained in:
parent
d05c851ba6
commit
bef37a721c
@ -130,9 +130,7 @@ subroutine filter_connected_i_H_psi0(key1,key2,Nint,sze,idx)
|
|||||||
do i=1,sze
|
do i=1,sze
|
||||||
degree_x2 = popcnt(xor( key1(1,1,i), key2(1,1))) + &
|
degree_x2 = popcnt(xor( key1(1,1,i), key2(1,1))) + &
|
||||||
popcnt(xor( key1(1,2,i), key2(1,2)))
|
popcnt(xor( key1(1,2,i), key2(1,2)))
|
||||||
if (degree_x2 > 4) then
|
if (degree_x2 <= 4) then
|
||||||
cycle
|
|
||||||
else if(degree_x2 /= 0)then
|
|
||||||
idx(l) = i
|
idx(l) = i
|
||||||
l = l+1
|
l = l+1
|
||||||
endif
|
endif
|
||||||
@ -146,9 +144,7 @@ subroutine filter_connected_i_H_psi0(key1,key2,Nint,sze,idx)
|
|||||||
popcnt(xor( key1(2,1,i), key2(2,1))) + &
|
popcnt(xor( key1(2,1,i), key2(2,1))) + &
|
||||||
popcnt(xor( key1(1,2,i), key2(1,2))) + &
|
popcnt(xor( key1(1,2,i), key2(1,2))) + &
|
||||||
popcnt(xor( key1(2,2,i), key2(2,2)))
|
popcnt(xor( key1(2,2,i), key2(2,2)))
|
||||||
if (degree_x2 > 4) then
|
if (degree_x2 <= 4) then
|
||||||
cycle
|
|
||||||
else if(degree_x2 /= 0)then
|
|
||||||
idx(l) = i
|
idx(l) = i
|
||||||
l = l+1
|
l = l+1
|
||||||
endif
|
endif
|
||||||
@ -164,9 +160,7 @@ subroutine filter_connected_i_H_psi0(key1,key2,Nint,sze,idx)
|
|||||||
popcnt(xor( key1(2,2,i), key2(2,2))) + &
|
popcnt(xor( key1(2,2,i), key2(2,2))) + &
|
||||||
popcnt(xor( key1(3,1,i), key2(3,1))) + &
|
popcnt(xor( key1(3,1,i), key2(3,1))) + &
|
||||||
popcnt(xor( key1(3,2,i), key2(3,2)))
|
popcnt(xor( key1(3,2,i), key2(3,2)))
|
||||||
if (degree_x2 > 4) then
|
if (degree_x2 <= 4) then
|
||||||
cycle
|
|
||||||
else if(degree_x2 /= 0)then
|
|
||||||
idx(l) = i
|
idx(l) = i
|
||||||
l = l+1
|
l = l+1
|
||||||
endif
|
endif
|
||||||
@ -174,6 +168,8 @@ subroutine filter_connected_i_H_psi0(key1,key2,Nint,sze,idx)
|
|||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|
||||||
|
integer, save :: icount(4) = (/0,0,0,0/)
|
||||||
!DIR$ LOOP COUNT (1000)
|
!DIR$ LOOP COUNT (1000)
|
||||||
outer: do i=1,sze
|
outer: do i=1,sze
|
||||||
degree_x2 = 0
|
degree_x2 = 0
|
||||||
@ -181,21 +177,17 @@ subroutine filter_connected_i_H_psi0(key1,key2,Nint,sze,idx)
|
|||||||
do m=1,Nint
|
do m=1,Nint
|
||||||
if ( key1(m,1,i) /= key2(m,1)) then
|
if ( key1(m,1,i) /= key2(m,1)) then
|
||||||
degree_x2 = degree_x2+ popcnt(xor( key1(m,1,i), key2(m,1)))
|
degree_x2 = degree_x2+ popcnt(xor( key1(m,1,i), key2(m,1)))
|
||||||
if (degree_x2 > 4) then
|
|
||||||
cycle outer
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
if ( key1(m,2,i) /= key2(m,2)) then
|
if ( key1(m,2,i) /= key2(m,2)) then
|
||||||
degree_x2 = degree_x2+ popcnt(xor( key1(m,2,i), key2(m,2)))
|
degree_x2 = degree_x2+ popcnt(xor( key1(m,2,i), key2(m,2)))
|
||||||
|
endif
|
||||||
if (degree_x2 > 4) then
|
if (degree_x2 > 4) then
|
||||||
cycle outer
|
cycle outer
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
enddo
|
enddo
|
||||||
if(degree_x2 /= 0)then
|
|
||||||
idx(l) = i
|
idx(l) = i
|
||||||
l = l+1
|
l = l+1
|
||||||
endif
|
icount(3) = icount(3) + 1_8
|
||||||
enddo outer
|
enddo outer
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user