Fast code for LOQC