Abstract 1 Introduction 2 Problem Settings 3 Warm-Ups 4 Our Approach 5 An Implication: Generalized Pure-State Fidelity Estimation 6 Lower Bounds 7 Discussion References

Optimal Quantum Algorithm for Estimating Fidelity to a Pure State

Wang Fang ORCID School of Informatics, University of Edinburgh, UK Qisheng Wang ORCID School of Informatics, University of Edinburgh, UK
Abstract

We present an optimal quantum algorithm for fidelity estimation between two quantum states when one of them is pure. In particular, the (square root) fidelity of a mixed state to a pure state can be estimated to within additive error ε by using Θ(1/ε) queries to their state-preparation circuits, achieving a quadratic speedup over the folklore O(1/ε2). Our approach is technically simple, and can moreover estimate the quantity tr(ρσ2) that is not common in the literature. To the best of our knowledge, this is the first query-optimal approach to fidelity estimation involving mixed states.

Keywords and phrases:
Quantum computing, fidelity estimation, quantum algorithms, quantum query complexity
Funding:
Wang Fang: Supported by the Engineering and Physical Sciences Research Council under Grant EP/X025551/1.
Qisheng Wang: Supported by the Engineering and Physical Sciences Research Council under Grant EP/X026167/1.
Copyright and License:
[Uncaptioned image] © Wang Fang and Qisheng Wang; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Quantum query complexity
; Theory of computation Quantum information theory
Related Version:
Full Version: https://arxiv.org/abs/2506.23650 [6]
Editors:
Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz Herman

1 Introduction

The fidelity between quantum states [24, 13] is a closeness measure that is commonly used in quantum physics and quantum computing [20, 34, 12, 33]. Formally, for two (mixed) quantum states ρ and σ, their (square root) fidelity is defined by (see [20, Equation (9.53)])

F(ρ,σ)=tr(σρσ).

The fidelity is generally bounded by 0F(ρ,σ)1. In particular, when F(ρ,σ)=1, the two states ρ and σ are identical; and when F(ρ,σ)=0, the two states are orthogonal.

The estimation of fidelity turns out to be central in quantum property testing (cf. [18]). The earliest approach is now known as the SWAP test [5], allowing us to estimate to within additive error ε the squared fidelity F2(ρ,σ)=tr(ρσ) when ρ and σ are pure states, using O(1/ε2) samples of ρ and σ. Moreover, the squared fidelity F2(ρ,σ) for pure states ρ and σ can be estimated using O(1/ε) queries to their state-preparation circuits through the SWAP test [5] equipped with quantum amplitude estimation [4]. The approach based on the SWAP test has been found to have various applications [21]. Fidelity estimation for pure states was also considered in some restricted models: a direct fidelity estimation [7] was proposed when only Pauli measurements are allowed and a distributed approach was developed in [1]. Recently, query-optimal and sample-optimal quantum algorithms for estimating the fidelity F(ρ,σ)=tr(ρσ) for pure states ρ and σ have been found in [25] and [28], respectively.

Although fidelity estimation is known to be 𝖡𝖰𝖯-complete when one of the quantum states is pure [22], fidelity estimation for mixed states is 𝖰𝖲𝖹𝖪-hard in general [31, 32], which means that there is no polynomial-time quantum algorithm for fidelity estimation unless 𝖡𝖰𝖯=𝖰𝖲𝖹𝖪. Nevertheless, efficient quantum algorithms for fidelity estimation for low-rank states were recently discovered [29] and later improved [26, 10] with time complexity poly(r,1/ε), where r is the rank of the states. Quantum algorithms for fidelity estimation for well-conditioned states was recently proposed with query complexity poly(κ)O~(1/ε) [15], achieving almost optimal dependence on the precision ε, where κ is the condition number such that ρ,σI/κ.

In this paper, we present an optimal quantum algorithm for estimating the fidelity of a mixed state ρ to a pure state σ=|ψψ|, using queries to the state-preparation circuits of both states. The input model is known as the “purified quantum query access” model, where we assume query access to (the controlled version of) a quantum unitary oracle that prepares the purification of the input quantum state, and its inverse. This input model is commonly employed in quantum computational complexity [31] and quantum algorithms [8]. Our main result is stated in the following theorem.

Theorem 1 (Estimating fidelity to a pure state, Theorem 6 simplified).

Given purified quantum query access to a mixed state ρ and a pure state σ=|ψψ|, the fidelity F(ρ,σ)=ψ|ρ|ψ can be estimated to within additive error ε with query complexity O(1/ε).

Prior to the result of Theorem 1, we are only aware of a folklore quantum algorithm based on the SWAP test (which was mentioned above and will be explained in detail in Section 3.1). This folklore approach computes F2(ρ,σ)=ψ|ρ|ψ to within additive error ε with query complexity O(1/ε), thereby resulting in a query complexity of O(1/ε2) for estimating F(|ψ,ρ) to within additive error ε. By comparison, Theorem 1 exhibits a quadratic improvement.

The quantum query algorithm given in Theorem 1 generalizes the pure-state fidelity estimation in [25] where unitary oracles are required to directly prepare the pure states. In comparison, our result in Theorem 1 allows the unitary oracles to have redundant output qubits (see Section 5 for more details).

Our approach is actually optimal, as it can be used to estimate the fidelity between two pure states and the quantum query lower bound Ω(1/ε) is due to [2, 19] (noted in [25]). In Section 6, we further show that the optimality holds even if ρ is of an arbitrary rank.

We compare fidelity estimations for pure states in Table 1.

Table 1: Complexity of estimating the fidelity F(ρ,σ).
Reference Condition Complexity Notes
[5] One of ρ and σ is pure O(1/ε4) samples /
[5, 4] O(1/ε2) queries /
This Work 𝚯(𝟏/𝜺) queries Optimal
[25] Both ρ and σ are pure Θ(1/ε) queries Optimal
[28] Θ(1/ε2) samples Optimal
[29, 26, 10] Either ρ or σ is of rank r poly(r,1/ε) queries /
[10] poly(r,1/ε) samples /
[15] ρ,σI/κ poly(κ)Θ~(1/ε) queries Almost optimal in ε
poly(κ,1/ε) samples /

As a bonus, our approach in Theorem 1 can further estimate the quantity tr(ρσ2) with optimal query complexity (see Section 4.2), which is of independent interest as this quantity is not common in the literature.

Organization of this paper.

We give a formal definition of the purified quantum query access model and the problem statement of fidelity estimation in Section 2. Then, we review previous approaches in Section 3 with their subroutines. In Section 4, we present our approach and its generalization. An implication of our results is discussed in Section 5. Lower bounds for fidelity estimation are given in Section 6. Finally, a brief discussion is drawn in Section 7.

2 Problem Settings

In this paper, we assume purified quantum query access to the input quantum states. This input model is widely used in the literature, e.g., [8, 23, 11, 10, 30, 27, 16].

Definition 2 (Purified quantum query access).

For a mixed quantum state ρ, purified quantum query access to ρ means query access to a unitary oracle U that prepares a purification of ρ. Specifically, suppose U𝖠𝖡 acts on two subsystems 𝖠 and 𝖡, then ρ𝖠=tr𝖡(|ρρ|𝖠𝖡), where |ρ𝖠𝖡=U𝖠𝖡|0𝖠𝖡. Moreover, we are allowed to use queries to (controlled-)U and its inverse.

We consider the problem of fidelity estimation, formally stated as follows.

Problem 1 (Fidelity estimation).

Given purified quantum query access to two mixed quantum states ρ and σ, the task is to compute F(ρ,σ) to within additive error ε.

In particular, this paper focuses on the case of Problem 1 where σ=|ψψ| is pure.

3 Warm-Ups

As a warm-up, we review the previous approaches to fidelity estimation involving pure states, together with their useful subroutines.

3.1 SWAP Test

It is well known that the SWAP test [5] can be used to estimate the fidelity F(ρ,σ) when one of ρ and σ is pure. In particular, if σ=|ψψ| is pure, the SWAP test on input ρ and σ (see Figure 1) outputs a bit x{0,1} such that (adapted from [14, Proposition 9])

Pr[x=0]=1+F2(ρ,|ψ)2. (1)

With this, we can estimate F(ρ,|ψ). Specifically, suppose that p~ is an estimate of Pr[x=0] such that |p~Pr[x=0]|δ. Then, it can be shown that 2p~1 is an estimate of F(ρ,|ψ) with |2p~1F(ρ,|ψ)|Θ(δ). An estimate of F(ρ,|ψ) to within additive error ε can be obtained by setting δ=Θ(ε2).

Figure 1: The SWAP test for estimating F(ρ,|ψ).

To estimate F(ρ,|ψ) when given purified quantum query access to ρ and |ψ, we need the quantum subroutine for amplitude estimation [4].

Theorem 3 (Quantum amplitude estimation, [4]).

Suppose that U is a unitary operator such that U|0𝖠|0𝖡=p|0𝖠|φ0𝖡+1p|1𝖠|φ1𝖡, where p[0,1] and |φ0,|φ1 are normalized pure states. Then, we can estimate p to within additive error δ using O(1/δ) queries to (controlled-)U and its inverse.

By Theorem 3, we can therefore obtain an estimate of F(ρ,|ψ) to within additive error ε using O(1/ε2) queries to the state-preparation circuits of ρ and |ψ, based on the SWAP test in Figure 1.

3.2 Pure-State Fidelity Estimation

Recently, a new approach was proposed in [25] for estimating the fidelity F(|φ,|ψ) between two pure quantum states |φ and |ψ, improving the folklore approach in Section 3.1. However, the approach in [25] assumes a slightly more restricted input model, where Uφ and Uψ are two unitary quantum circuits that respectively prepare |φ and |ψ, i.e., Uφ|0=|φ and Uψ|0=|ψ.

The key idea of [25] is to encode the value of F(|φ,|ψ) in the amplitudes of a quantum state, rather than the (1+F2(|φ,|ψ))/2 (in Equation 1). Specifically, F(|φ,|ψ) can be encoded by the unitary operator W=UφUψ such that

W|0=F(|φ,|ψ)|0+|, (2)

where | is an (unnormalized) pure state that is orthogonal to |0. The circuit W is depicted in Figure 2 and it outputs a bit x{0,1} such that

Pr[x=0]=F2(|φ,|ψ). (3)
Figure 2: The quantum circuit for estimating F(|φ,|ψ).

Finally, the value of F(|φ,|ψ) can be estimated by the square root amplitude estimation provided in [25].

Theorem 4 (Quantum square root amplitude estimation, [25, Theorem I.5]).

Suppose that U is a unitary operator such that U|0𝖠|0𝖡=p|0𝖠|φ0𝖡+1p|1𝖠|φ1𝖡, where p[0,1] and |φ0,|φ1 are normalized pure states. Then, we can estimate p to within additive error δ using O(1/δ) queries to (controlled-)U and its inverse.

For convenience, throughout this paper, we use 𝖲𝗊𝗋𝗍𝖠𝗆𝗉𝖤𝗌𝗍(U,ε) to denote (the returned value of) the square root amplitude estimation process.

Compared to Theorem 3, Theorem 4 gives an estimate of p (instead of p), thereby allowing us to skip taking square roots. By Theorem 4, we can therefore obtain an estimate of F(|φ,|ψ) to within additive error ε using O(1/ε) queries to the state-preparation circuits of |φ and |ψ, based on the construction of W in Equation 2.

4 Our Approach

For the task of estimating the fidelity F(ρ,|ψ) of a mixed state to a pure state, the approach in Section 3.1 only gives a query complexity of O(1/ε2), while the approach in Section 3.2, however, turns out not to be applicable (as a more restricted input model is assumed). In this section, we present a simple quantum algorithm that estimates F(ρ,|ψ) to within additive error ε using O(1/ε) queries to the state-preparation circuits of ρ and |ψ.

Suppose that the purified quantum query access to ρ and |ψ is given by two quantum circuits U and V, respectively:

U𝖠𝖡|0𝖠|0𝖡 =|ρ𝖠𝖡, (4)
V𝖠𝖡|0𝖠|0𝖡 =|ψ𝖠|ψ𝖡, (5)

where ρ𝖠=tr𝖡(|ρρ|𝖠𝖡) and |ψ𝖡 is any pure state. Here, 𝖠, 𝖡, 𝖠, and 𝖡 are subscripts of subsystems for clarity, where the subsystems 𝖠 and 𝖠 have the same dimension. Without loss of generality, we can also assume that the subsystems 𝖡 and 𝖡 have the same dimension.111If the subsystem 𝖡 has a larger dimension than 𝖡, then V𝖠𝖡I𝖢 (for certain subsystem 𝖢) can be a purified quantum query oracle for |ψ with the ancilla system 𝖡𝖢 having the same dimension as 𝖡. A similar construction also applies to the case that the subsystem 𝖡 has a larger dimension than 𝖡.

4.1 Fidelity to a Pure State

Our idea is to encode F(ρ,|ψ) in the amplitudes of an efficiently preparable quantum state, and then take use of the square root amplitude estimation in Theorem 4. To this end, we present a quantum circuit

W=(V𝖠𝖡I𝖠𝖡)𝖲𝖶𝖠𝖯𝖡𝖡(U𝖠𝖡V𝖠𝖡). (6)

This circuit is depicted in Figure 3 and it outputs two bits x𝖠,x𝖡{0,1} such that

Pr[x𝖠=x𝖡=0]=F2(ρ,|ψ). (7)

Equation 7 is comparable to Equation 1 for the SWAP test and Equation 3 for the pure-state fidelity estimation, and it can be verified by the following proposition.

Figure 3: The encoding unitary operator W for F(ρ,|ψ).
Proposition 5.

(0|𝖠0|𝖡I𝖠𝖡)W|0𝖠|0𝖡|0𝖠|0𝖡2=F2(ρ,|ψ), where W is defined by Equation 6, U𝖠𝖡 is defined by Equation 4, and V𝖠𝖡 is defined by Equation 5.

Proof.

This can be shown by direct calculations.

(0|𝖠0|𝖡I𝖠𝖡)W|0𝖠|0𝖡|0𝖠|0𝖡2
= (0|𝖠0|𝖡I𝖠𝖡)(V𝖠𝖡I𝖠𝖡)𝖲𝖶𝖠𝖯𝖡𝖡(U𝖠𝖡V𝖠𝖡)|0𝖠|0𝖡|0𝖠|0𝖡2
= (ψ|𝖠ψ|𝖡I𝖠𝖡)𝖲𝖶𝖠𝖯𝖡𝖡|ρ𝖠𝖡|ψ𝖠|ψ𝖡2
= (ψ|𝖠I𝖡𝖠ψ|𝖡)|ρ𝖠𝖡|ψ𝖠|ψ𝖡2
= (ψ|𝖠I𝖡𝖠)|ρ𝖠𝖡|ψ𝖠2
= ρ|𝖠𝖡ψ|𝖠(|ψψ|𝖠I𝖡𝖠)|ρ𝖠𝖡|ψ𝖠
= ρ|𝖠𝖡(|ψψ|𝖠I𝖡)|ρ𝖠𝖡
= tr((|ψψ|𝖠I𝖡)|ρρ|𝖠𝖡)
= tr(tr𝖡((|ψψ|𝖠I𝖡)|ρρ|𝖠𝖡))
= tr(|ψψ|𝖠tr𝖡(|ρρ|𝖠𝖡))
= tr(|ψψ|𝖠ρ𝖠)
= F2(ρ,|ψ).

According to Proposition 5, we can write

W|0𝖠|0𝖡|0𝖠|0𝖡=F(ρ,|ψ)|0𝖠|0𝖡|ϕ𝖠𝖡+1F2(ρ,|ψ)|ϕ𝖠𝖡𝖠𝖡 (8)

for some normalized pure states |ϕ and |ϕ such that (|00|𝖠|00|𝖡I𝖠𝖡)|ϕ=0. With this, we can therefore estimate F(ρ,|ψ) using the square root amplitude estimation (Theorem 4). We formally state the result and give its rigorous proof as follows.

Algorithm 1 Quantum query algorithm for estimating fidelity to a pure state.
Theorem 6 (Estimating fidelity to a pure state).

Suppose that U and V are quantum unitary operators that prepare n-qubit purifications of a k-qubit mixed state ρ=tr𝖡(|ρρ|𝖠𝖡) and a k-qubit pure state |ψψ|=|ψψ|𝖠, respectively, as in Equations 4 and 5. For ε(0,1), there is a quantum query algorithm that estimates F(ρ,|ψ) to within additive error ε with probability at least 2/3 using O(1/ε) queries to (controlled-)U, (controlled-)V, and their inverses.

Proof.

The formal algorithm is given in Algorithm 1. To make the proof rigorous, we introduce an auxiliary system 𝖢 that consists of one qubit. Let

W=((I𝖢|00|𝖠|00|𝖡+X𝖢(I𝖠𝖡|00|𝖠|00|𝖡))I𝖠𝖡)W, (9)

where W is defined by Equation 6. According to Equation 8, we have

W|0𝖢|0𝖠|0𝖡|0𝖠|0𝖡=F(|ψ,ρ)|0𝖢|0𝖠|0𝖡|ϕ𝖠𝖡+1F(|ψ,ρ)2|1𝖢|ϕ𝖠𝖡𝖠𝖡.

Finally, we can obtain an estimate x~=𝖲𝗊𝗋𝗍𝖠𝗆𝗉𝖤𝗌𝗍(W,ε) of F(|ψ,ρ) to within additive error ε (i.e., |x~F(|ψ,ρ)|<ε) with probability at least 2/3 using O(1/ε) queries to W. According to Equations 9 and 6, one query to W consists of one query to U and two queries to V. Therefore, the way we obtain x~ uses O(1/ε) queries to both U and V.

4.2 Generalization to Two Mixed States

In this subsection, we naturally extend the unitary operator in Figure 3 to the scenario where V prepares a purification of an arbitrary mixed state σ. That is, we replace Equation 5 with

V𝖠𝖡|0𝖠|0𝖡=|σ𝖠𝖡, (10)

where σ𝖠=tr𝖡(|σσ|𝖠𝖡). In this case, it turns out that tr(ρσ2) is encoded in the amplitude. Note that when σ is pure, σ2=σ, the quantity tr(ρσ2) equals the fidelity F(ρ,σ). Specifically, the circuit in Figure 3 outputs two bits x𝖠,x𝖡{0,1} such that

Pr[x𝖠=x𝖡=0]=tr(ρσ2), (11)

which generalizes Equation 7. This can be verified by the following proposition.

Proposition 7.

(0|𝖠0|𝖡I𝖠𝖡)W|0𝖠|0𝖡|0𝖠|0𝖡2=tr(ρσ2), where W is defined by Equation 6, U𝖠𝖡 is defined by Equation 4, and V𝖠𝖡 is defined by Equation 10.

Proof.

This can be shown by direct calculations generalizing the proof of Proposition 5.

(0|𝖠0|𝖡I𝖠𝖡)W|0𝖠|0𝖡|0𝖠|0𝖡2
= (σ|𝖠𝖡I𝖠𝖡)𝖲𝖶𝖠𝖯𝖡𝖡|ρ𝖠𝖡|σ𝖠𝖡2
= ρ|𝖠𝖡σ|𝖠𝖡𝖲𝖶𝖠𝖯𝖡𝖡(|σσ|𝖠𝖡I𝖠𝖡)𝖲𝖶𝖠𝖯𝖡𝖡|ρ𝖠𝖡|σ𝖠𝖡
= tr(𝖲𝖶𝖠𝖯𝖡𝖡(|σσ|𝖠𝖡I𝖠𝖡)𝖲𝖶𝖠𝖯𝖡𝖡(|ρρ|𝖠𝖡|σσ|𝖠𝖡))
= tr(𝖲𝖶𝖠𝖯𝖠𝖠(I𝖠𝖡|σσ|𝖠𝖡)𝖲𝖶𝖠𝖯𝖠𝖠(|ρρ|𝖠𝖡|σσ|𝖠𝖡))
= tr(tr𝖡(𝖲𝖶𝖠𝖯𝖠𝖠(I𝖠𝖡|σσ|𝖠𝖡)𝖲𝖶𝖠𝖯𝖠𝖠(|ρρ|𝖠𝖡|σσ|𝖠𝖡)))
= tr(𝖲𝖶𝖠𝖯𝖠𝖠(I𝖠|σσ|𝖠𝖡)𝖲𝖶𝖠𝖯𝖠𝖠(tr𝖡(|ρρ|𝖠𝖡)|σσ|𝖠𝖡))
= tr(𝖲𝖶𝖠𝖯𝖠𝖠(I𝖠|σσ|𝖠𝖡)𝖲𝖶𝖠𝖯𝖠𝖠(ρ𝖠|σσ|𝖠𝖡))
= tr((I𝖠σ|𝖠𝖡)𝖲𝖶𝖠𝖯𝖠𝖠(I𝖠|σσ|𝖠𝖡)𝖲𝖶𝖠𝖯𝖠𝖠(ρ𝖠|σ𝖠𝖡))
= tr(((I𝖠σ|𝖠𝖡)𝖲𝖶𝖠𝖯𝖠𝖠(I𝖠|σ𝖠𝖡))2ρ𝖠).

The proof is completed by showing that (I𝖠σ|𝖠𝖡)𝖲𝖶𝖠𝖯𝖠𝖠(I𝖠|σ𝖠𝖡)=σ𝖠. To see this, note that

(I𝖠σ|𝖠𝖡)𝖲𝖶𝖠𝖯𝖠𝖠(I𝖠|σ𝖠𝖡)
= tr𝖠𝖡(𝖲𝖶𝖠𝖯𝖠𝖠(I𝖠|σσ|𝖠𝖡))
= tr𝖠(𝖲𝖶𝖠𝖯𝖠𝖠(I𝖠tr𝖡(|σσ|𝖠𝖡)))
= tr𝖠(𝖲𝖶𝖠𝖯𝖠𝖠(I𝖠σ𝖠))
= tr𝖠((σ𝖠I𝖠)𝖲𝖶𝖠𝖯𝖠𝖠)
= σ𝖠tr𝖠(𝖲𝖶𝖠𝖯𝖠𝖠)
= σ𝖠I𝖠
= σ𝖠.

Therefore, with a similar analysis, we can estimate the quantity tr(ρσ2) by Proposition 7 with the same complexity as Theorem 6, stated as follows.

Theorem 8.

Suppose that U and V are quantum unitary operators that prepare n-qubit purifications of a k-qubit mixed states ρ=tr𝖡(|ρρ|𝖠𝖡) and σ=tr𝖡(|σσ|𝖠𝖡), respectively, as in Equations 4 and 10. For ε(0,1), there is a quantum query algorithm that estimates tr(ρσ2) to within additive error ε with probability at least 2/3 using O(1/ε) queries to (controlled-)U, (controlled-)V, and their inverses.

To provide an intuitive understanding of our encoding scheme, we restructure the circuit in Figure 3 into the form shown in Figure 4.

Figure 4: Restructured circuit of Figure 3, illustrating the operator σ𝖠I𝖡 and its action on the purification |ρ𝖠𝖡.

This revised visualization explicitly reveals the construction of an operator σ𝖠I𝖡 acting on the purification |ρ𝖠𝖡 of ρ𝖠. Since

(σ𝖠I𝖡)|ρ𝖠𝖡2=tr(ρσ2),

we clearly see that tr(ρσ2) is encoded into the amplitude of an efficiently preparable quantum state. While the encoding pattern for σ in Figure 4 had previously appeared in [17], people mainly focused on operator properties without explicitly deriving the amplitude structure of the resulting pure state.

5 An Implication: Generalized Pure-State Fidelity Estimation

Our quantum algorithm provided in Theorem 1 suggests a new approach to estimating the fidelity between pure states, where the pure states are given through purified quantum query access, or equivalently prepared by (purified) quantum channels. The purified quantum query access to a (mixed) quantum state can be understood as a purified version of the quantum channel that prepares the quantum state (cf. [9]). Formally, a quantum channel is said to prepare a quantum state ρ, if ρ=(|00|). A purified version of is a unitary operator U acting on two subsystems 𝖠 and 𝖡 such that (σ)=tr𝖡(U(σ𝖠|00|𝖡)U) for every mixed quantum state σ. Then, ρ can be prepared by the unitary operator U in the way that its purification is prepared by |ρ𝖠𝖡=U|0𝖠|0𝖡 and ρ is obtained by tracing out the subsystem 𝖡, i.e., ρ=tr𝖡(|ρρ|𝖠𝖡). In the following, we state the special case of Theorem 1 for pure-state fidelity estimation.

Corollary 9 (Pure-state fidelity estimation).

Given purified quantum query access to two pure states |φ and |ψ, the fidelity F(|φ,|ψ)=|φ|ψ| can be estimated to within additive error ε with query complexity O(1/ε).

Corollary 9 generalizes the pure-state fidelity estimation in [25, Theorem IV.2] to a more general input model. By comparison, the prior approach for pure-state fidelity estimation [25] requires that the pure states should be prepared by a unitary quantum channel. Specifically, Ref. [25] assumes two unitary oracles Uφ and Uψ such that Uφ|0=|φ and Uψ|0=|ψ (see Section 3.2 for details). The input model employed in [25] is more restricted than the purified quantum query access model. For example, UφI always provides purified quantum query access to |φ, where I is the identity operator; however, it is unlikely that Uφ could be implemented by purified quantum query access to |φ.

In addition to adopting a more general input model than [25], Corollary 9 attains the same optimal query complexity of O(1/ε), where the lower bound (noted in [25]) is implied in [2, 19] (see Theorem 10).

6 Lower Bounds

For completeness, we discuss the lower bounds for estimating the fidelity. In fact, a lower bound of Ω(1/ε) is implied in [2, 19] when both quantum states are pure (as noted in [25]).

Theorem 10 (Adapted from [2, 19]).

Given purified quantum query access to quantum states ρ and |ψ, any quantum query algorithm that estimates F(ρ,|ψ) to within additive error ε requires query complexity Ω(1/ε), even if ρ is pure.

We strengthen this lower bound so that it applies to the case where ρ is a mixed quantum state of an arbitrary rank.

Theorem 11.

Given purified quantum query access to quantum states ρ and |ψ, any quantum query algorithm that estimates F(ρ,|ψ) to within additive error ε requires query complexity Ω(1/ε), even if ρ is of an arbitrary rank.

To prove Theorem 11, we need the following tool.

Theorem 12 ([3, Theorem 4]).

Let p and q be probability distributions over n elements. Then, any quantum algorithm that determines whether an unknown unitary oracle U is

Up=j=1npj|j or Uq=j=1nqj|j

requires Ω(1/dH(p,q)) queries to U, where

dH(p,q)=12j=1n(pjqj)2

is the Hellinger distance.

Now we are ready to prove the lower bounds.

Proof of Theorem 11.

Let r=rank(ρ)2 be an arbitrary rank parameter. Now we reduce the distinguishing problem in Theorem 12 to the estimation of F(ρ,|ψ). Consider the two probability distributions p± such that

p1±=p±ε,pj±=1pεr1 for 2jr, and pj±=0 for r<jn,

where p(0,1) is an arbitrary constant. It can be verified that

dH(p+,p)=1p2ε2(1p)2ε2O(ε).

To distinguish whether an unknown unitary oracle U is Up+ or Up, we can prepare a mixed state ρ that is either of the following two mixed states

ρ±=(p±ε)|00|+j=2r1pεr1|jj|,

using one query to U. By taking |ψ=|0, we can distinguish which the case is by noting that the fidelity F(ρ±,|0)=p±ε=p±Θ(ε). Therefore, any quantum algorithm for estimating F(ρ,|ψ) to within additive error Θ(ε) requires query complexity Ω(1/dH(p+,p))=Ω(1/ε), even if ρ is of rank r.

7 Discussion

In this paper, we present an optimal quantum algorithm for estimating the fidelity of a mixed state to a pure state, given purified quantum query access. Our approach is simple, which moreover estimates the quantity tr(ρσ2) that has not been commonly considered in the literature. Here, we raise some questions for future research.

  1. 1.

    Can we encode tr(ρσ) rather than tr(ρσ2) in the amplitudes? In addition to its relationship with fidelity estimation, this may also estimate the Frobenius norm of a quantum state, ρF=tr(ρ2), which is also the square root of purity.

  2. 2.

    Can we estimate the fidelity F(ρ,|ψ) with optimal sample complexity, generalizing the result of [28]?

References

  • [1] Anurag Anshu, Zeph Landau, and Yunchao Liu. Distributed quantum inner product estimation. In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing, pages 44–51, 2022. doi:10.1145/3519935.3519974.
  • [2] Robert Beals, Harry Buhrman, Richard Cleve, Michele Mosca, and Ronald de Wolf. Quantum lower bounds by polynomials. Journal of the ACM, 48(4):778–797, 2001. doi:10.1145/502090.502097.
  • [3] Aleksandrs Belovs. Quantum algorithms for classical probability distributions. In Proceedings of the 27th Annual European Symposium on Algorithms, pages 16:1–16:11, 2019. doi:10.4230/LIPIcs.ESA.2019.16.
  • [4] Gilles Brassard, Peter Høyer, Michele Mosca, and Alain Tapp. Quantum amplitude amplification and estimation. In Samuel J. Lomonaco, Jr. and Howard E. Brandt, editors, Quantum Computation and Information, volume 305 of Contemporary Mathematics, pages 53–74. AMS, 2002. doi:10.1090/conm/305/05215.
  • [5] Harry Buhrman, Richard Cleve, John Watrous, and Ronald de Wolf. Quantum fingerprinting. Physical Review Letters, 87(16):167902, 2001. doi:10.1103/PhysRevLett.87.167902.
  • [6] Wang Fang and Qisheng Wang. Optimal quantum algorithm for estimating fidelity to a pure state. ArXiv e-prints, 2025. doi:10.48550/arXiv.2506.23650.
  • [7] Steven T. Flammia and Yi-Kai Liu. Direct fidelity estimation from few Pauli measurements. Physical Review Letters, 106(23):230501, 2011. doi:10.1103/PhysRevLett.106.230501.
  • [8] András Gilyén and Tongyang Li. Distributional property testing in a quantum world. In Proceedings of the 11th Innovations in Theoretical Computer Science Conference, pages 25:1–25:19, 2020. doi:10.4230/LIPIcs.ITCS.2020.25.
  • [9] András Gilyén, Seth Lloyd, Iman Marvian, Yihui Quek, and Mark M. Wilde. Quantum algorithm for Petz recovery channels and pretty good measurements. Physical Review Letters, 128(22):220502, 2022. doi:10.1103/PhysRevLett.128.220502.
  • [10] András Gilyén and Alexander Poremba. Improved quantum algorithms for fidelity estimation. ArXiv e-prints, 2022. arXiv:2203.15993.
  • [11] Tom Gur, Min-Hsiu Hsieh, and Sathyawageeswar Subramanian. Sublinear quantum algorithms for estimating von Neumann entropy. ArXiv e-prints, 2021. arXiv:2111.11139.
  • [12] Masahito Hayashi. Quantum Information Theory: Mathematical Foundation. Springer, 2017. doi:10.1007/978-3-662-49725-8.
  • [13] Richard Jozsa. Fidelity for mixed quantum states. Journal of Modern Optics, 41(12):2315–2323, 1994. doi:10.1080/09500349414552171.
  • [14] Hirotada Kobayashi, Keiji Matsumoto, and Tomoyuki Yamakami. Quantum Merlin-Arthur proof systems: are multiple Merlins more helpful to Arthur? Chicago Journal of Theoretical Computer Science, 2009:3, 2009. doi:10.4086/cjtcs.2009.003.
  • [15] Nana Liu, Qisheng Wang, Mark M. Wilde, and Zhicheng Zhang. Quantum algorithm for matrix geometric means. npj Quantum Information, 11:101, 2025. doi:10.1038/s41534-025-00973-7.
  • [16] Yupan Liu and Qisheng Wang. On estimating the trace of quantum state powers. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms, pages 947–993, 2025. doi:10.1137/1.9781611978322.28.
  • [17] Guang Hao Low and Isaac L. Chuang. Hamiltonian Simulation by Qubitization. Quantum, 3:163, 2019. doi:10.22331/q-2019-07-12-163.
  • [18] Ashley Montanaro and Ronald de Wolf. A survey of quantum property testing. In Theory of Computing Library, number 7 in Graduate Surveys, pages 1–81. University of Chicago, 2016. doi:10.4086/toc.gs.2016.007.
  • [19] Ashwin Nayak and Felix Wu. The quantum query complexity of approximating the median and related statistics. In Proceedings of the 31st Annual ACM Symposium on Theory of Computing, pages 384–393, 1999. doi:10.1145/301250.301349.
  • [20] Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press, 2010.
  • [21] Harumichi Nishimura. A survey: SWAP test and its applications to quantum complexity theory. In Shin-ichi Minato, Takeaki Uno, Norihito Yasuda, Takashi Horiyama, Ken-ichi Kawarabayashi, Shigeru Yamashita, and Hirotaka Ono, editors, Algorithmic Foundations for Social Advancement: Recent Progress on Theory and Practice, pages 243–261. Springer, 2025. doi:10.1007/978-981-96-0668-9_16.
  • [22] Soorya Rethinasamy, Rochisha Agarwal, Kunal Sharma, and Mark M. Wilde. Estimating distinguishability measures on quantum computers. Physical Review A, 108(1):012409, 2023. doi:10.1103/PhysRevA.108.012409.
  • [23] Sathyawageeswar Subramanian and Min-Hsiu Hsieh. Quantum algorithm for estimating α-renyi entropies of quantum states. Physical Review A, 104(2):022428, 2021. doi:10.1103/PhysRevA.104.022428.
  • [24] Armin Uhlmann. The “transition probability” in the state space of a *-algebra. Reports on Mathematical Physics, 9(2):273–279, 1976. doi:10.1016/0034-4877(76)90060-4.
  • [25] Qisheng Wang. Optimal trace distance and fidelity estimations for pure quantum states. IEEE Transactions on Information Theory, 70(12):8791–8805, 2024. doi:10.1109/TIT.2024.3447915.
  • [26] Qisheng Wang, Ji Guan, Junyi Liu, Zhicheng Zhang, and Mingsheng Ying. New quantum algorithms for computing quantum entropies and distances. IEEE Transactions on Information Theory, 70(8):5653–5680, 2024. doi:10.1109/TIT.2024.3399014.
  • [27] Qisheng Wang and Zhicheng Zhang. Fast quantum algorithms for trace distance estimation. IEEE Transactions on Information Theory, 70(4):2720–2733, 2024. doi:10.1109/TIT.2023.3321121.
  • [28] Qisheng Wang and Zhicheng Zhang. Sample-optimal quantum estimators for pure-state trace distance and fidelity via samplizer. ArXiv e-prints, 2024. doi:10.48550/arXiv.2410.21201.
  • [29] Qisheng Wang, Zhicheng Zhang, Kean Chen, Ji Guan, Wang Fang, Junyi Liu, and Mingsheng Ying. Quantum algorithm for fidelity estimation. IEEE Transactions on Information Theory, 69(1):273–282, 2023. doi:10.1109/TIT.2022.3203985.
  • [30] Xinzhao Wang, Shengyu Zhang, and Tongyang Li. A quantum algorithm framework for discrete probability distributions with applications to Rényi entropy estimation. IEEE Transactions on Information Theory, 70(5):3399–3426, 2024. doi:10.1109/TIT.2024.3382037.
  • [31] John Watrous. Limits on the power of quantum statistical zero-knowledge. In Proceedings of the 43rd Annual IEEE Symposium on Foundations of Computer Science, pages 459–468, 2002. doi:10.1109/SFCS.2002.1181970.
  • [32] John Watrous. Zero-knowledge against quantum attacks. SIAM Journal on Computing, 39(1):25–58, 2009. doi:10.1137/060670997.
  • [33] John Watrous. The Theory of Quantum Information. Cambridge University Press, 2018. doi:10.1017/9781316848142.
  • [34] Mark M. Wilde. Quantum Information Theory. Cambridge University Press, 2013. doi:10.1017/9781316809976.