  We present a generalized quantum scattering circuit which can be used to
perform non-invasive quantum measurements, and implement it on NMR qubits. Such
a measurement is a key requirement for testing temporal non-contextual
inequalities. We use this circuit to experimentally demonstrate the violation
of the Peres-Mermin inequality (which is the temporal analog of a Klyachko-Can-
Binicioglu-Shumovsky (KCBS) inequality), on a three-qubit NMR quantum
information processor. Further, we experimentally demonstrate the violation of
a transformed Bell-type inequality (the spatial equivalent of the temporal KCBS
inequality) and show that its Tsirelson bound is the same as that for the
temporal KCBS inequality. In the temporal KCBS scenario, the contextual bound
is strictly lower than the quantum temporal and nonlocal bounds.
