# How to Aggregate Multiple Gate Fidelities

The fidelity of a qubit is nicely defined here and gate fidelity as "the average fidelity of the output state over pure input states" (defined here).

How can one combine the fidelies of two (or more) gates to get a combined total gate fidelity? As in, if a qubit is operated on by two (or more) gates, how can we calculate the expected fidelity of the qubit (compared to its original state) after being operated on by those gates if all we know is the gate fidelity of each gate?

I imagine it is deducible from the definition of qubit fidelity... I haven't been able to figure it out. I also did a lot of searching online and couldn't find anything. I prefer the definition on the wikipedia page: $$F(\rho, \sigma)=\left|\left\langle\psi_{\rho} \mid \psi_{\sigma}\right\rangle\right|^{2}$$ for comparing the input state to the output state. It is easy to work with. A solution explained in these terms is much preferred.

I don't know if you can exactly compute the combined total gate fidelity since the noise processes reducing the fidelity of each gate individually might compose in nontrivial ways. However if you know the individual gate fidelities and those fidelities satisfy certain properties, then you can bound the total gate fidelity. This is the "chaining property for fidelity" ( e.g. Nielsen and Chuang Section 9.3).

Suppose you intend to apply $$U_1$$ to $$\rho$$ as the first gate in a sequence, but the actual operation you apply is the CPTP map $$\mathcal{E}_1(\rho)$$ which is some noisy version of $$U_1$$. A natural way to measure the error is in the operation you applied is:

$$E(U_1, \mathcal{E}_1) = \max_\rho D(U_1 \rho U_1^\dagger, \mathcal{E}_1(\rho))$$

where $$D(\rho, \sigma) = \arccos \sqrt{F(\rho, \sigma)}$$ is a possible choice for $$D$$, but you can use any metric over quantum states. Finding the maximum distance between $$U_1 \rho U_1^\dagger$$ and $$\mathcal{E}_1(\rho)$$ over density matrices $$\rho$$ tells you the worst possible outcome you can get from your noisy implementation of the gate. Then, if you define the error similarly for $$U_2$$ and its noisy implementation $$\mathcal{E}_2$$ then you can guarantee that

$$E(U_2 U_1, \mathcal{E}_2 \circ \mathcal{E}_1) \leq E(U_1,\mathcal{E}_1) + E(U_2, \mathcal{E}_2 )$$

which says that the worst case error for applying both of your gates is no worse than the sum of the worst case errors for applying the gates individually.

Unfortunately the fidelity $$F(\rho, \sigma) =\text{Tr}( \rho \sigma)$$ that you give isn't a proper metric over states so you can't substitute that into the chaining property above.

• thanks, that is a really informative answer. I feel silly in realizing that I didn't properly explain that what I wanted was to combine average gate fidelities to get a total average gate fidelity. Do you know how of a way to combine average gate fidelities? I might make a new question. Commented Jan 4, 2021 at 17:24
• nevermind, i realized you addressed this in your first paragraph. two gates could in fact have low average fidelities but 'cancel each other out' and have a combined higher fidelity when used one after the other. Commented Jan 5, 2021 at 23:19
• yea that's the main concern, and something thats nicely avoided by forcing the use of a worst-case fidelity like the one above. People will still sometimes combine average fidelities as simple products but its only good as a rough approximation of what you expect the device to do. See my answer to quantumcomputing.stackexchange.com/questions/8669/… for example Commented Jan 6, 2021 at 0:35
• right. I figure taking the products won't work since you could end up less than 50% fidelity given enough products... which doesn't make sense. 50% in practical terms is the lowest fidelity you can get. Commented Jan 18, 2021 at 17:15