from typing import Dict
from typing import List


def counts_to_list(counts: Dict[str, int]) -> List[int]:
    """Converts counts to a list representation

    :param counts: a Qiskit-style counts dictionary
    :return: a list of integers
    """
    num_bits = len(list(counts.keys())[0].replace(' ', ''))
    counts_list = [0] * 2 ** num_bits
    for state in counts:
        f_state = state.replace(' ', '')
        counts_list[int(f_state, 2)] = counts[state]
    return counts_list