%creates two vectors (or rather one matrix with two columns) of single
%particle states that will be used for interchanging to find connections
%The computations are not that heavy, and the results not that large, maybe
%it could be loaded as textfile

%input is the full single particle basis, including quantum numbers

function enpop = enpoperators(spBasis)
rad = 0;
for i = 1:length(spBasis)
    for j = i:length(spBasis) % note that it is sufficient to run from i
        
        % checks if parity and m-sum will be conserved, if so, save the
        % states as a one-body operator
        if ( spBasis{i}(4) == spBasis{j}(4) ) && ( (-1)^spBasis{i}(1) == (-1)^spBasis{j}(1) )
            rad = rad+1;
            enpoperator(rad,:) = [j i];
        end
    end
    
end
enpop = enpoperator;
end