Preparation of logical state with qLDPC code

I'm recently learning qLDPC code. Although I've seen literature talking about the code construction, parity check, possible logical operation and decoding. How exactly do I prepare e.g. a logical phi state in the Hypergraph Product code? ... I remember when we deal with stabilizer codes we can prepare a logical 0 state using 0 initial states and measure the stabilizers, but how about arbitrary logical state? And are there any shortcuts for this?

Appreciate if you can attach the related paper! Thanks.

• That's basically the same question as "how do I perform universal quantum computation on the state?" since, starting from logical 0, you can compute to produce the state you want. Nov 23, 2023 at 8:50
• @DaftWullie Thanks. So I saw for the Steane code,Figure 9 in arxiv.org/pdf/1707.09951.pdf has an encoding scheme. I’m just wondering how you do the same for other stabiliser code Nov 23, 2023 at 14:35
• There are many ways! The important question is to what extent you're worrying about the encoding gates themselves being noisy, and whether you need some robustness built in. If not (Fig 9 of that paper doesn't), one method is to find out how to reduce an error correcting code to a graph state by local equivalences (there are questions on this site about it). The circuit for producing a graph state is easy. Nov 23, 2023 at 14:42
• If you are asking for encoding circuits in the noise-free regime, please see previous answers here or here. These answers specify how to encode the zero state. If you want to encode an arbitrary state, just input it on the last qubit (in my convention) of these encoding circuits. Nov 24, 2023 at 4:52
• @AbdullahKhalid Thanks! Can you make these encodings fault-tolerant though? Nov 24, 2023 at 5:38

Under noiseless conditions, you can create a encoding circuit, using Gottesman's algorithm for any $$[[n,k,d]]$$ stabilizer code. You can input any arbitrary $$k$$-qubit physical state, known or unknown, into this circuit and it will produce the corresponding logical state.

If you require fault-tolerance, then you can only prepare a known arbitrary state $$|\psi\rangle_k$$. By known state, I mean that you know a circuit $$C$$, such that $$C$$ acting on $$|0^k\rangle_k$$ creates $$|\psi\rangle_k$$. To do this, first create a logical zero state in a fault-tolerant fashion.

1. Start with $$|0^n\rangle_n$$.
2. Measure all the stabilizer generators.
3. Use the outcome of these measurements to compare all subsequent syndrome measurements to.

With $$|\bar 0\rangle_n$$ in hand, use a fault-tolerant version of $$C$$ to create $$|\bar\psi\rangle_n$$.

Why can't you fault-tolerantly encode arbitrary unknown states? Well, suppose someone gives you a $$|\psi\rangle_k$$. And suppose you have some hypothetical fault-tolerant circuit [1] $$C_F$$ that will transform all such states to $$|\bar\psi\rangle_n$$. Well, think about the moment in time just before the first gate of $$C_F$$ is applied to $$|\psi\rangle_k$$. If an error occurs at this point, then there is nothing $$C_F$$ can do to identify the error, let alone correct it.

Technically, a fault-tolerant operation is one that restricts logical error probability to $$\mathcal{O}(p^2)$$, where $$p$$ is the physical error rate. An error that occurs just before the first gate in $$C_F$$ is a $$\mathcal{O}(p)$$ event, and it destroys the logical state with the same probability. Hence, the probability of logical error is $$\mathcal{O}(p)$$, and the circuit is not fault-tolerant.

[1] The hypothetical is that the circuit is fault-tolerant, not that it exists. We have already shown in the first paragraph that such circuits exist.

General states is impossible; your gate set must be discrete to have fault tolerance. Even preparing simple states is hard. It's still an open research question. For example, Tomas Jochym O'Connor's talk at the QEC 2023 conference was on this topic.

• Thanks. Very interesting! What do you think of Abdullah's comment? Maybe for arbitrary state we can't prepare fault-tolerantly? We have to follow the |0>_L followed by logical gates sort of thing? Nov 27, 2023 at 5:03
• @AndyLiuin Their answer is that arbitrary states is impossible. My answer is that even simple states are a hard research problem, in the context of LDPC codes. They complement each other. Nov 27, 2023 at 5:40