  We describe a bilinear identity satisfied by certain multidimensional
q-hypergeometric integrals. The identity can be considered as a deformation of
the Riemann bilinear relation for the twisted de Rham (co)homologies.
  The identity also gives an explicit formula for scalar products of solutions
of the qKZ and the dual qKZ equations, therefore providing a deformation of
Gaudin-Korepin's formula for norms of the Bethe vectors.
