This code will generate the coherent state of any dimension of field.Here the inputs are complex amplitude and dimension.
Ex: Coh=coherentstate(3,40)
here 3 is the amplitude and 40 is the dimension of field. It will generate a column matrix of dimension 40.If u will plot this state, it will be a poissonian distribution with peak at 'alpha'*alpha'.
in my example, peak will occur at 9.
Cite As
NILAKANTHA MEHER (2026). coherentstate.m (https://www.mathworks.com/matlabcentral/fileexchange/47622-coherentstate-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2007b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Creating and Concatenating Matrices in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
