use Trace3D it does quadrupole magnetic lenses (used for strong particle focusing) or you can do the math: a quadrupole lens focuses in one plane and defocuses in the perpendicular, so you need two or more to get net focusing. This all linear focusing, you need more sophisticated analysis to add in aberrations.
If you mean different currents in the quadrupole electromagnets then you are not correcting aberrations, only changing the linear focusing in the two different perpendicular planes. To correct aberrations you need to use higher order multipole magnets - sextupole, octupole, etc. There is an extensive literature on all of this, I suggest you go to the SLAC, BNL, FNL or another particle accelerator lab website where there are links to all the literature.
A usable estimation for the focus of a _thin_ magnetic lens (short solenoid) in paraxial approximation: f~8R^2/L, where R is the ion gyroradius in the lens center, L is the characteristic gradient scale of magnetic field in the center.
Thank you. I am reading the literature to extract the equations and I downloaded the software.
My idea is to use two thin lens with different (high) currents to reduce as much as possible the defocusing in the perpendicular and in the axial axle to collide high density ion beams again HLi6 target. It must be impossible to have a little defocusing due dense ions repulsion.