About a Beam splitter system

Dear Pennylane supervisor,

To see what happens when Amplitude is reduced in a Beam splitter system, I carried out the below calculation. I confirmed the intensity step. This intensity step could be due to
(1) rounding error in the calculation, (2) quantization of the real single photons, and other answers.
I appreciate it if you can explain what is the reason for this? In addition, where comes from the special value of 1.1E-16. Python program is as follows:

import pennylane as qml
from pennylane import numpy as np
import matplotlib.pyplot as plt

dev_exact2 = qml.device(“default.gaussian”, wires = 2)

def measurement(a, phi):
qml.Displacement(a, phi, wires = 0) # Implement displacement using PennyLane
return qml.expval(qml.X(0))

def measurement2(a, theta, alpha, phi):
qml.Displacement(a, theta, wires = 0) # We choose the initial to be a displaced vacuum
qml.CoherentState(alpha, phi, wires = 1) # Prepare coherent as second qumode
qml.Beamsplitter(np.pi / 4, 0, wires=[0, 1]) # Interfere both states
return qml.expval(qml.NumberOperator(0)), qml.expval(qml.NumberOperator(1)) # Read out N


count = 0
while count <=180:
a = 2.0E-08
theta = count*pi/180.

print("Theta: {}".format(count), "Detector 1: {}".format(measurement2(a, theta, a, 0)[0].numpy()), "|", "Detector 2: {}".format(measurement2(a, theta, a, 0)[1].numpy()))


print (“End of calculation”)
----- End of program ----

Thank you four your help,


I just have solved my question by myself.

It is sorry to submit for this clear issue. In my high school age, I 've learn
this matter.


Hi @Hiro, welcome to our community! It’s great that you posted this question here and also that you found an answer. Do you want to post the answer here so that others can benefit from it too?