Hello! I am trying to simulate a 4-mode SBS using the following code:
# Setting up the experiment - 4 mode SBS
r = 0.3 # squeezing parameter for S2 gate
scattershot_bs = sf.Program(8)
with scattershot_bs.context as q:
S2gate(r) | (q[0], q[4])
S2gate(r) | (q[1], q[5])
S2gate(r) | (q[2], q[6])
S2gate(r) | (q[3], q[7])
# MeasureFock() | q[0]
# MeasureFock() | q[1]
# MeasureFock() | q[2]
# MeasureFock() | q[3]
# introducing loss in the channels
LossChannel(0.08) | q[4]
LossChannel(0.82) | q[5]
LossChannel(0.55) | q[6]
LossChannel(0.24) | q[7]
Interferometer(U) | (q[4], q[5], q[6], q[7])
# introducing loss in the channels
LossChannel(0.46) | q[4]
LossChannel(0.65) | q[5]
LossChannel(0.41) | q[6]
LossChannel(0.37) | q[7]
# MeasureFock() | q[4]
# MeasureFock() | q[5]
# MeasureFock() | q[6]
# MeasureFock() | q[7]
# Initializing the engine
eng = sf.Engine(backend="gaussian")
# Executing the program with the engine
results = eng.run(scattershot_bs)
Now if I want to get the probability of let’s say [1,0,0,0,1,0,0,0] and I am using results.state.fock_prob([1,0,0,0,1,0,0,0]), then I am getting the probability of 0.00013140826379994975.
Now if I want to calculate the same probability from PNR counts, then I use MeasureFock() (as commented in the code). I generated 100,000 samples and the counts for [1,0,0,0,1,0,0,0] was 111 - which makes a probability of 0.00111.
I cannot understand why there is this difference. Is there some internal normalization that state.fock_prob() is doing? It will be really helpful to get some insight.
Thank you!