Realization of the approach proposed in Fig. 1 for the encoding of Eq. (7). a On a sensing platform or during its emulation, the output probabilities are directly computed from the POVM measurements. The derivatives are computed using the parameter-shift rule. b When simulating on a quantum computer, the action of the noise channel is simulated by altering the POVM. The derivatives are computed by measuring the expectation values of a set of operators, used in training the network.