Implement percolate.sample_states