refactored diracmatrix.jl and diracvector.jl to use @assert