def mem_used_positions(qmem):
    """Return the list of used (True) or empty (False) positions
    in a quantum memory"""

    ret = []
    for i in range(len(qmem.mem_positions)):
        ret.append(qmem.get_position_used(i))
    return ret