Choosing number of photons in the GBS sampling

Hello, I’m using SF’s GBS sampling function to sample a series of small graphs I have and then using sf.apps.similarity.feature_vector_events_sampling to create vectors from the samples.

On page five of “Measuring the similarity of graphs with a Gaussian Boson Sampler” https://arxiv.org/pdf/1905.12646.pdf there is a guide on choosing the number of samples you want to find. This is going to hugely affect runtime.

It says the sample number is not affected by the size of graphs, just your choice of k. Is there any guidance on choosing k though? Is there a good rule-of-thumb to have in this scenario?

Hey @andrew,

Unfortunately, as with any hyperparameter this is very problem dependent. But one can get inspiration from classical graph kernels like graphlet sampling kernels, where k is between 3 and 5. I remember that the dependency on k was actually not that large in the end, small values were good enough…

thanks @Maria_Schuld for the response. I’ll try out using the sampler with n_mean=3,4,5,etc and the corresponding sample number and see how it runs