Just thought that adding a function specifically for computing average photon number for a given qumode state would be helpful for the repo. The docstring for the function is copied below. Let me know what you think!
def avg_photon_num(state, decimals: int=2):
"""Returns average photon number of state using the number operator.
Args:
state (Statevector or DensityMatrix): State to operate on
decimals: Determines precision of calculation
Returns:
float: Average photon number to specified precision
"""
Hi Tim and Kevin,
Just thought that adding a function specifically for computing average photon number for a given qumode state would be helpful for the repo. The docstring for the function is copied below. Let me know what you think!