I don't ever remember implementing an iterator over the elements of a
sparse matrix. At least you could make the corresponding dict (of only
nonzero entries) and then iterate over that:
a = matrix(QQ,1000,sparse=True); a[0,5] = 10; a[10,15] = 2/3
for x, y in a.dict().iteritems():
print x, y
-- William