mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-24 21:41:46 +02:00
- Create a new module, named
PrintHij
for example, which needs the moduleDeterminants
:
qp_module.py create -n "PrintHij" Determinants
- Go into the
$QP_ROOT/src/PrintHij
module and rename the filePrintHij.main.irp.f
asPrintHij.irp.f
cd $QP_ROOT/src/PrintHij
mv PrintHij.main.irp.f PrintHij.irp.f
- Edit
PrintHij.irp.f
as follows
program print_matrix_element
use bitmasks
implicit none
integer(bit_kind) :: det_i(N_int,2)
integer(bit_kind) :: det_j(N_int,2)
double precision :: hij
integer :: i,j
print *, 'Determinant <i| ?'
read(*,*) i
1:N_int, 1:2) = psi_det(1:N_int, 1:2, i)
det_i(
print *, 'Determinant |j> ?'
read(*,*) j
1:N_int, 1:2) = psi_det(1:N_int, 1:2, j)
det_j(
call i_H_j(det_i, det_j, N_int, hij)
print *, '<i|H|j> = ', hij
end
Run
ninja
to compile thePrintHij
programRun
make
in the$QP_ROOT/ocaml
directory such that it rebuilds also the OCaml binariesYou’re done! Take an EZFIO directory containing a wave function and set the
read_wf
flag totrue
, then
qp_run PrintHij test.ezfio