def matrix_eye(n, **options):
    format = options.get('format', 'sympy')
    if format == 'sympy':
        return eye(n)
    elif format == 'numpy':
        return _numpy_eye(n)
    elif format == 'scipy.sparse':
        return _scipy_sparse_eye(n)
    raise NotImplementedError('Invalid format: %r' % format)
Get the version of eye and tensor_product for a given format.
dataset/ETHPy150Open sympy/sympy/sympy/physics/quantum/matrixutils.py/matrix_eye