### Matrix conjugacy classes over Z and ideal classes

I had a couple questions; the first involves matrix conjugacy classes over the integers and the second involves integral bases. I'm not sure what the algorithms in Sage are for the following procedures.

1) Is it possible to determine if two integer-valued square matrices (which are conjugate over Q) are also conjugate over Z?

2) In a number field K, given an ideal class I, we can find an integral basis for a representative ideal in I by the command:

sage: I.integral_basis()

Is it possible to work in the reverse direction, that is given a set of elements in K which form an integral basis, is it possible to find the corresponding ideal and ideal class for that integral basis?

Thanks in advance for any advice.