def get_bit_string(n, n_qubits):
    """Returns the binary string of an integer with n_qubits characters
    Derived from https://sarangzambare.github.io/jekyll/update/2020/06/13/quantum-frequencies.html
    Args:
        n (int): integer to be converted
        n_qubits (int): number of qubits

    Returns:
        string: binary string
    """
    binaryString = "{0:b}".format(n)
    binaryString = "0"*(n_qubits - len(binaryString)) + binaryString

    return binaryString