qiskit/visualization/text.py
def connect_with(self, wire_char):
        """
        Connects the elements in the layer using wire_char.
        Args:
            wire_char (char): For example '║' or '│'.
        """

        if len([qbit for qbit in self.qubit_layer if qbit is not None]) == 1:
            # Nothing to connect
            return

        for label, affected_bits in self.connections:

            if not affected_bits:
                continue

            affected_bits[0].connect(wire_char, ['bot'])
            for affected_bit in affected_bits[1:-1]:
                affected_bit.connect(wire_char, ['bot', 'top'])

            affected_bits[-1].connect(wire_char, ['top'], label)

            if label:
                for affected_bit in affected_bits:
                    affected_bit.right_fill = len(label) + len(affected_bit.mid)
def connect_with(self, wire_char):
        """
        Connects the elements in the layer using wire_char.
        Args:
            wire_char (char): For example '║' or '│'.
        """

        if len([qbit for qbit in self.qubit_layer if qbit is not None]) == 1:
            # Nothing to connect
            return

        for label, affected_bits in self.connections:

            if not affected_bits:
                continue

            affected_bits[0].connect(wire_char, ['bot'])
            for affected_bit in affected_bits[1:-1]:
                affected_bit.connect(wire_char, ['bot', 'top'])

            affected_bits[-1].connect(wire_char, ['top'], label)

            if label:
                for affected_bit in affected_bits:
                    affected_bit.right_fill = len(label) + len(affected_bit.mid)
def connect_with ( self , wire_char ) : if len ( [ qbit for qbit in self . qubit_layer if qbit is not None ] ) == 1 : # Nothing to connect return for label , affected_bits in self . connections : if not affected_bits : continue affected_bits [ 0 ] . connect ( wire_char , [ 'bot' ] ) for affected_bit in affected_bits [ 1 : - 1 ] : affected_bit . connect ( wire_char , [ 'bot' , 'top' ] ) affected_bits [ - 1 ] . connect ( wire_char , [ 'top' ] , label ) if label : for affected_bit in affected_bits : affected_bit . right_fill = len ( label ) + len ( affected_bit . mid )
Connects the elements in the layer using wire_char.
        Args:
            wire_char (char): For example '║' or '│'.
Connects the elements in the layer using wire_char . Args : wire_char ( char ) : For example ║ or │ .