@staticmethod
def format_gate_name(prefix, gate_name):
    """Formats gate_name by surrounding with brackets and prepending prefix. Used in this case
         to recursively build a program while defining new gates.

        :param str prefix: The prefix to prepend.
        :param str gate_name: The gate name to format and extend.
        :return: The formatted gate name.
        """
    formatted_gate_name = prefix + '-' + gate_name
    return formatted_gate_name
