In quantum hall effect we measure the hall conductance (in transverse direction) which is quantized. My question how do they take care of the edge states that are in the longitudinal side?
There are a bunch of subtleties about the measurements and the conditions that define an “ideal” measurement. But here is the basic idea.
One of the most common measurement geometries is the "Hall bar" geometry. See Fig 4 here:
Ideally, the source and the drain can be viewed as reservoirs at different chemical potentials. In a steady state the upper edge (the one carrying the current from left to right), is in equilibrium with the source and not with the drain, i.e. it has the chemical potential of the source. This is possible because the edge is fully chiral, so the electrons on it emanate from the source. The converse is true for the lower edge that carries current from right to left: it is in equilibrium with the drain and not the source.
So, when the experimentalist measure the "longitudinal voltage" they hook up the voltmeter to a single edge (see the voltmeter next to the $R_L$ in the link). Since a single edge is in equilibrium the voltmeter reads zero voltage (a voltmeters really measures the chemical potential difference between two points). This measurement is a convention for defining the longitudinal resistance, and in a quantum Hall plateau it gives zero.
On the other hand the transverse resistance or Hall resistance is measured (or “defined” if you wish) by hooking up the voltmeter between the two edges that are not in equilibrium (see the voltmeter next to the $R_L$ in the link). Since each of them is in equilibrium with the source and drain separately, the voltmeter reading will coincide with the source to drain chemical potential difference, and its ratio with the measured source to drain current will give the amazingly accurately quantized values that people see in the Hall plateaus.