def create_index_of_A_matrix(db):
    """
    Create a dictionary with row/column indices of the A matrix as key and a tuple (activity name, reference product,
    unit, location) as value.
    :return: a dictionary to map indices to activities
    :rtype: dict
    """
    return {
        (
            db[i]["name"],
            db[i]["reference product"],
            db[i]["unit"],
            db[i]["location"],
        ): i
        for i in range(0, len(db))
    }