The molecule. H2 at a bond length of 0.735 angstrom in the minimal STO-3G basis has four spin-orbitals. With the parity mapping and two-qubit reduction, the electronic Hamiltonian becomes a sum of Pauli strings (coefficients in Hartree, as published in the Qiskit chemistry tutorials; spot-check them against your own integrals):
The ansatz. |psi(theta)> = cos(theta)|01> + sin(theta)|10>. theta = 0 is the Hartree-Fock state, other angles mix in the second configuration (electron correlation). It conserves the electron number, so it contains the exact ground state.
Measuring energy. A quantum computer cannot read H directly. Z-type terms come from measuring both qubits in Z; XX needs a Hadamard on each qubit first. With N shots per setting, the estimate has statistical error ~ 1/sqrt(N). The energy is the weighted sum of the measured Pauli averages.
Optimizer. E(theta) = a + R cos(2 theta - phi), so the exact gradient follows from the parameter-shift rule: dE/dtheta = E(theta + pi/4) - E(theta - pi/4). Each step uses four circuit settings' worth of shots; gradient descent with step 0.3.
Noise. A depolarizing channel rho -> (1-p) rho + p I/4 scales every non-identity Pauli average by (1-p): E_noisy = c_II + (1-p)(E - c_II). Gate noise therefore shifts the answer; the optimizer then finds the minimum of the noisy landscape (which is still at the same theta here, but with a higher energy).
Simplifications: the electron-density cloud is schematic, no molecular geometry optimization, no readout error, no mitigation, a classical statevector simulation of the circuit.