<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_state_vector_sampler(n_sample):
 """Returns a function which get the expectations by sampling the state vector"""

    def sampling_by_measurement(circuit, meas):
        val = 0.0
        e = expect(circuit.run(returns="statevector"), meas)
        bits, probs = zip(*e.items())
        dists = np.random.multinomial(n_sample, probs) / n_sample
        return dict(zip(tuple(bits), dists))
    return sampling_by_measurement