# How to merge logical computation with encoding-decoding schemes

Usually QEC is treated in two different ways.

1. Definition of a logical computation with a non-destructive QEC scheme
2. Definition of a encoding-decoding scheme with destructive measurement after decoding

Is it possible to merge these two approaches in order to get something like:

encoding -> logical computation -> detection -> correction -> decoding

This would be really helpful as at the end I need to perform QPT on the circuit.

• My guess is that you can. I'm not 100% sure but here's my thinking : if $U$ is the identity then your circuit is a classical encoder/decoder circuit of $[[n=3,k=1]]$ code. c3 is the syndrome associated with err; if err is correctable that you can use c3 to apply the right correction. Now for arbitrary $U$, I think that just changes your stabilizer code by mapping each stabilizer $H_i$ to $U^\dagger H_i U$ so now you're dealing with a code with conjugated stabilizers; if $U$ is clifford then that's just another stabilizer code with different Pauli strings. The correction should still work. Jun 4, 2022 at 2:43
• I don't get it, the stabilizer has no impact on the computation, which means that it already is of the form $U^\dagger S_i U$. Jun 4, 2022 at 18:43
• I re-wrote the question hoping to be clearer.. Jun 4, 2022 at 18:56
• I don't follow the two definitions but the merged sequence seems right : take your $[[3,1,3]]$ code for example input=$a00$, encoding gives $aaa$,logic computation for example gives $\bar a \bar a \bar a$,error on qubit one gives $a \bar a \bar a$ detection and correction changes that to $\bar a \bar a \bar a$; so you performed $a \to \bar a$ even in the presence of noise. Is this what you had in mind? Jun 4, 2022 at 20:46
• Yes and at the end a decoding. I'm trying to do that with a sequence of bitflip and phaseflip detection and then decoding Jun 5, 2022 at 14:26