q-switched nd yag laser machine theory