You have the pulse sensor, you have the code, you have a pulse, I assume, so why not test it instead of asking us?
I suspect it will not work because the output of the sensor will not be a large enough range of values to register as HIGH and LOW. But I could be wrong.
But the State Change example can be easily adapted to use an analog input, it is meant to illustrate a principle which can be applied in many situations, not just reading digital inputs.
All you need to adapt the State Change example to work with your pulse sensor is a threshold value to compare with the reading from the analog pin. I suspect that calculating that threshold is the tricky part. The demo sketch for the pulse sensor should show you how that is done. Can you post that sketch also?
By the way, thank you and well done for using code tags. Some links to the pulse sensor should be useful. The forum sticky post will tell you how to post links.