qiskit/visualization/text.py
def center_label(self, input_length, order):
        """
        In multi-bit elements, the label is centered vertically.
        Args:
            input_length (int): Rhe amount of wires affected.
            order (int): Which middle element is this one?
        """
        location_in_the_box = '*'.center(input_length * 2 - 1).index('*') + 1
        top_limit = order * 2 + 2
        bot_limit = top_limit + 2
        if top_limit <= location_in_the_box < bot_limit:
            if location_in_the_box == top_limit:
                self.top_connect = self.label
            elif location_in_the_box == top_limit + 1:
                self.mid_content = self.label
            else:
                self.bot_connect = self.label
def center_label(self, input_length, order):
        """
        In multi-bit elements, the label is centered vertically.
        Args:
            input_length (int): Rhe amount of wires affected.
            order (int): Which middle element is this one?
        """
        location_in_the_box = '*'.center(input_length * 2 - 1).index('*') + 1
        top_limit = order * 2 + 2
        bot_limit = top_limit + 2
        if top_limit <= location_in_the_box < bot_limit:
            if location_in_the_box == top_limit:
                self.top_connect = self.label
            elif location_in_the_box == top_limit + 1:
                self.mid_content = self.label
            else:
                self.bot_connect = self.label
def center_label ( self , input_length , order ) : location_in_the_box = '*' . center ( input_length * 2 - 1 ) . index ( '*' ) + 1 top_limit = order * 2 + 2 bot_limit = top_limit + 2 if top_limit <= location_in_the_box < bot_limit : if location_in_the_box == top_limit : self . top_connect = self . label elif location_in_the_box == top_limit + 1 : self . mid_content = self . label else : self . bot_connect = self . label
In multi-bit elements, the label is centered vertically.
        Args:
            input_length (int): Rhe amount of wires affected.
            order (int): Which middle element is this one?
In multi - bit elements the label is centered vertically . Args : input_length ( int ) : Rhe amount of wires affected . order ( int ) : Which middle element is this one?