def _gate(self, xy, fc=None, wide=False, text=None, subtext=None):
    (xpos, ypos) = xy
    if wide:
        wid = (WID * 2.8)
    else:
        wid = WID
    if fc:
        _fc = fc
    elif text:
        _fc = self._style.dispcol[text]
    else:
        _fc = self._style.gc
    box = patches.Rectangle(xy=((xpos - (0.5 * wid)), (ypos - (0.5 * HIG))), width=wid, height=HIG, fc=_fc, ec=self._style.lc, linewidth=1.5, zorder=PORDER_GATE)
    self.ax.add_patch(box)
    if text:
        disp_text = '${}$'.format(self._style.disptex[text])
        if subtext:
            self.ax.text(xpos, (ypos + (0.15 * HIG)), disp_text, ha='center', va='center', fontsize=self._style.fs, color=self._style.gt, clip_on=True, zorder=PORDER_TEXT)
            self.ax.text(xpos, (ypos - (0.3 * HIG)), subtext, ha='center', va='center', fontsize=self._style.sfs, color=self._style.sc, clip_on=True, zorder=PORDER_TEXT)
        else:
            self.ax.text(xpos, ypos, disp_text, ha='center', va='center', fontsize=self._style.fs, color=self._style.gt, clip_on=True, zorder=PORDER_TEXT)
def _gate(self, xy, fc=None, wide=False, text=None, subtext=None):
    (xpos, ypos) = xy
    if wide:
        wid = (WID * 2.8)
    else:
        wid = WID
    if fc:
        _fc = fc
    elif text:
        _fc = self._style.dispcol[text]
    else:
        _fc = self._style.gc
    box = patches.Rectangle(xy=((xpos - (0.5 * wid)), (ypos - (0.5 * HIG))), width=wid, height=HIG, fc=_fc, ec=self._style.lc, linewidth=1.5, zorder=PORDER_GATE)
    self.ax.add_patch(box)
    if text:
        disp_text = '${}$'.format(self._style.disptex[text])
        if subtext:
            self.ax.text(xpos, (ypos + (0.15 * HIG)), disp_text, ha='center', va='center', fontsize=self._style.fs, color=self._style.gt, clip_on=True, zorder=PORDER_TEXT)
            self.ax.text(xpos, (ypos - (0.3 * HIG)), subtext, ha='center', va='center', fontsize=self._style.sfs, color=self._style.sc, clip_on=True, zorder=PORDER_TEXT)
        else:
            self.ax.text(xpos, ypos, disp_text, ha='center', va='center', fontsize=self._style.fs, color=self._style.gt, clip_on=True, zorder=PORDER_TEXT)