mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-31 00:23:42 +02:00
Bitmasks documentation
This commit is contained in:
parent
7a71170f5f
commit
c6886056b3
@ -29,6 +29,10 @@ end
|
|||||||
subroutine list_to_bitstring( string, list, n_elements, Nint)
|
subroutine list_to_bitstring( string, list, n_elements, Nint)
|
||||||
use bitmasks
|
use bitmasks
|
||||||
implicit none
|
implicit none
|
||||||
|
BEGIN_DOC
|
||||||
|
! Returns the physical string "string(N_int,2)" from the array of
|
||||||
|
! occupations "list(N_int*bit_kind_size,2)
|
||||||
|
END_DOC
|
||||||
integer, intent(in) :: Nint
|
integer, intent(in) :: Nint
|
||||||
integer(bit_kind), intent(out) :: string(Nint)
|
integer(bit_kind), intent(out) :: string(Nint)
|
||||||
integer, intent(in) :: list(Nint*bit_kind_size)
|
integer, intent(in) :: list(Nint*bit_kind_size)
|
||||||
@ -37,10 +41,6 @@ subroutine list_to_bitstring( string, list, n_elements, Nint)
|
|||||||
|
|
||||||
integer :: i, j
|
integer :: i, j
|
||||||
integer :: ipos, iint
|
integer :: ipos, iint
|
||||||
BEGIN_DOC
|
|
||||||
! Returnd the physical string "string(N_int,2)" from the array of
|
|
||||||
! occupations "list(N_int*bit_kind_size,2)
|
|
||||||
END_DOC
|
|
||||||
|
|
||||||
!
|
!
|
||||||
! <== ipos ==>
|
! <== ipos ==>
|
||||||
@ -120,26 +120,30 @@ end
|
|||||||
subroutine debug_det(string,Nint)
|
subroutine debug_det(string,Nint)
|
||||||
use bitmasks
|
use bitmasks
|
||||||
implicit none
|
implicit none
|
||||||
integer, intent(in) :: Nint
|
BEGIN_DOC
|
||||||
integer(bit_kind), intent(in) :: string(Nint,2)
|
! Subroutine to print the content of a determinant in '+-' notation and
|
||||||
character*(512) :: output(2)
|
! hexadecimal representation.
|
||||||
|
END_DOC
|
||||||
|
integer, intent(in) :: Nint
|
||||||
|
integer(bit_kind), intent(in) :: string(Nint,2)
|
||||||
|
character*(512) :: output(2)
|
||||||
call bitstring_to_hexa( output(1), string(1,1), Nint )
|
call bitstring_to_hexa( output(1), string(1,1), Nint )
|
||||||
call bitstring_to_hexa( output(2), string(1,2), Nint )
|
call bitstring_to_hexa( output(2), string(1,2), Nint )
|
||||||
print *, trim(output(1)) , '|', trim(output(2))
|
print *, trim(output(1)) , '|', trim(output(2))
|
||||||
|
|
||||||
call bitstring_to_str( output(1), string(1,1), Nint )
|
call print_det(string,Nint)
|
||||||
call bitstring_to_str( output(2), string(1,2), Nint )
|
|
||||||
print *, trim(output(1))
|
|
||||||
print *, trim(output(2))
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
subroutine print_det(string,Nint)
|
subroutine print_det(string,Nint)
|
||||||
use bitmasks
|
use bitmasks
|
||||||
implicit none
|
implicit none
|
||||||
integer, intent(in) :: Nint
|
BEGIN_DOC
|
||||||
integer(bit_kind), intent(in) :: string(Nint,2)
|
! Subroutine to print the content of a determinant using the '+-' notation
|
||||||
character*(512) :: output(2)
|
END_DOC
|
||||||
|
integer, intent(in) :: Nint
|
||||||
|
integer(bit_kind), intent(in) :: string(Nint,2)
|
||||||
|
character*(512) :: output(2)
|
||||||
|
|
||||||
call bitstring_to_str( output(1), string(1,1), Nint )
|
call bitstring_to_str( output(1), string(1,1), Nint )
|
||||||
call bitstring_to_str( output(2), string(1,2), Nint )
|
call bitstring_to_str( output(2), string(1,2), Nint )
|
||||||
|
Loading…
Reference in New Issue
Block a user