quisp icon indicating copy to clipboard operation
quisp copied to clipboard

Error Propagation of Single Qubit Gate X and Z are incorrect

Open Naphann opened this issue 3 years ago • 2 comments

Describe the Bug

The error propagation of single qubit gate X and Z is incorrect. The application of a perfect gate shouldn't introduce a new type of error, it should just transform the currently existing error into another form.

For X and Z gate, they do not transform any Pauli error at all but the code right now can introduce the error to a perfect state/remove the error.

https://github.com/sfc-aqua/quisp/blob/e74de6b082a9a1934124e0268d9280610a590198/quisp/modules/QNIC/StationaryQubit/StationaryQubit.cc#L268-L272

https://github.com/sfc-aqua/quisp/blob/e74de6b082a9a1934124e0268d9280610a590198/quisp/modules/QNIC/StationaryQubit/StationaryQubit.cc#L262-L266

Line 265 and line 271 in the snippet should be removed.

Additional Info

If the application of X and Z gate isn't meant to be for generating the desired state but it is intentional to be used to correct the errors, then we need line 265 and line 271.

Fix suggestion

Introduce new methods for error correction operation and remove line 265 and 271 from the ordinary gate X and Z application.

Naphann avatar Jan 09 '22 15:01 Naphann

We have two purposes for X gate; X gate implemented for an application and X gate for error correction. You know Pauli Error Simulator tracks errors as pauli labels. An X gate for application does not change such an X error label. An X gate for error correction removes such an X error label from an errored qubit or add an X error label to a clean qubit.

ngym avatar Jan 12 '22 05:01 ngym

@ngym Thanks for the comment. Yes, you're absolutely correct on that. I put a short sentence about that

If the application of X and Z gate isn't meant to be for generating the desired state but it is intentional to be used to correct the errors, then we need line 265 and line 271.

I should have explained a little bit more on that. Will edit the issue to fully state the 2 differences

Naphann avatar Jan 12 '22 05:01 Naphann

This is closed via PR #479

Naphann avatar Mar 01 '23 10:03 Naphann