Trellis Decoding And Applications For Quantum Error Correction