add import of laply and fix bug in .singletGate