drawCnot :: Double -> [Double] -> Diagram B
drawCnot t cs =  circle targetRad # lwL lWidth # translateY t
              <> controls
              <> line
  where line = drawLine 0 (top - bottom)
             # translateY bottom
          where top | maxY == t = maxY + targetRad
                    | otherwise = maxY
                bottom | minY == t = minY - targetRad
                       | otherwise = minY
                maxY = maximum (t:cs)
                minY = minimum (t:cs)
        controls = mconcat $ map drawCtrl cs
drawCnot :: Double -> [Double] -> Diagram B
drawCnot t cs =  circle targetRad # lwL lWidth # translateY t
              <> controls
              <> line
  where line = drawLine 0 (top - bottom)
             # translateY bottom
          where top | maxY == t = maxY + targetRad
                    | otherwise = maxY
                bottom | minY == t = minY - targetRad
                       | otherwise = minY
                maxY = maximum (t:cs)
                minY = minimum (t:cs)
        controls = mconcat $ map drawCtrl cs
drawCnot t cs =  circle targetRad # lwL lWidth # translateY t
              <> controls
              <> line
  where line = drawLine 0 (top - bottom)
             # translateY bottom
          where top | maxY == t = maxY + targetRad
                    | otherwise = maxY
                bottom | minY == t = minY - targetRad
                       | otherwise = minY
                maxY = maximum (t:cs)
                minY = minimum (t:cs)
        controls = mconcat $ map drawCtrl cs