Abstract 1 Introduction 2 Techniques 3 Related Work 4 Preliminaries 5 Estimation with Reflections 6 Samplizer for Pure States 7 The Algorithm 8 Optimality 9 Conclusion References

Sample-Optimal Quantum Estimators for Pure-State Trace Distance and Fidelity via Samplizer

Qisheng Wang ORCID School of Computer Science, Shanghai Jiao Tong University, Shanghai, China    Zhicheng Zhang ORCID School of Information and Communication Technology, Griffith University, Brisbane, Australia
Abstract

We settle the problem of estimating the trace distance and (square root) fidelity between n-qubit pure quantum states to within additive error ε, given their independent samples, which was raised as an open question by Wang (IEEE Trans. Inf. Theory 2024). This is achieved by a quantum algorithm with optimal sample complexity Θ(1/ε2), improving the long-standing folklore with sample complexity O(1/ε4). At the heart of our algorithm is a samplized phase estimation of the product of two Householder reflections. This is realized by an improved (multi-)samplizer for pure states, through which any quantum query algorithm using Q queries to the reflection operator I2|ψψ| can be converted to a δ-close (in the diamond norm distance) quantum sample algorithm using Θ(Q2/δ) samples of the state |ψ. This samplizer for pure states is also shown to be optimal.

Keywords and phrases:
Quantum algorithms, sample complexity, trace distance, fidelity, pure states, lower bounds, samplizer
Category:
Track A: Algorithms, Complexity and Games
Funding:
Qisheng Wang: Supported by startup funding from Shanghai Jiao Tong University.
Zhicheng Zhang: Supported in part by the Australian Research Council under Grant DP250102952.
Copyright and License:
[Uncaptioned image] © Qisheng Wang and Zhicheng Zhang; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Quantum computation theory
; Theory of computation Algorithm design techniques
Related Version:
Full Version: https://arxiv.org/abs/2410.21201 [42]
Acknowledgements:
Part of the work of Zhicheng Zhang was done when the author was with the Centre for Quantum Software and Information, University of Technology Sydney, Australia.
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

Trace distance and fidelity are the two most commonly used measures of the closeness between quantum states in many fundamental problems of quantum computation and quantum information (cf. [33]), e.g., quantum state discrimination [10, 6, 4], certification [3], and tomography [21, 34]. The trace distance between two mixed quantum states ρ and σ is defined by

T(ρ,σ)12tr(|ρσ|). (1)

The (square root) fidelity between ρ and σ is defined by

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

To clarify, the squared fidelity F2(ρ,σ)(F(ρ,σ))2 is also a closeness measure commonly used in the literature. As a quantum analog of estimating the closeness (e.g., total variation distance) between probability distributions [38], estimating the trace distance and (square root/squared) fidelity between quantum states turns out to be a basic problem of broad interest.

Figure 1: The SWAP test.

One of the earliest approach to this problem is the SWAP test [5, 9], as shown in Figure 1. On input two pure quantum states |φ and |ψ, the measurement outcome of the SWAP test will be 0 with probability 12+12F2(|φ,|ψ),111If we replace the pure quantum states |φ and |ψ with mixed quantum states ρ and σ, respectively, then the probability of measurement outcome 0 will be 12+12tr(ρσ) [28, Proposition 9]. where

F2(|φ,|ψ)=|φ|ψ|2. (3)

An ε-estimate (in terms of additive error) of F2(|φ,|ψ) can be obtained with high probability by repeating the SWAP test O(1/ε2) times, which uses O(1/ε2) samples of |φ and |ψ. Through this approach, ε-estimates of their trace distance and square root fidelity can be obtained by using O(1/ε4) samples,222This folklore approach was noted in [39, Appendix A]. according to the following identities

T(|φ,|ψ)=1F2(|φ,|ψ),F(|φ,|ψ)=F2(|φ,|ψ). (4)

Since the discovery of the SWAP test, there has been a series of work on testing/estimating the closeness of quantum states (see Section 3 for a comprehensive review). However, only a few special pure-state cases are known to have optimal algorithms. In [1], it was shown that ε-estimating F2(|φ,|ψ) requires Ω(1/ε2) samples of |φ and |ψ, thereby implying that the quantum circuit for the SWAP test in Figure 1 is the best (up to a constant factor) solution to this task that we can hope for; equipped with quantum amplitude estimation [8], the SWAP test further implies an optimal quantum query algorithm for ε-estimating F2(|φ,|ψ) by using O(1/ε) queries to the state-preparation circuits of |φ and |ψ, where the matching query complexity lower bound is due to [7, 32]. Given these results, one might presume that the SWAP test would also work best for estimating similar quantities such as T(|φ,|ψ) and F(|φ,|ψ). A piece of evidence against this is a recent quantum query algorithm proposed in [39] for ε-estimating T(|φ,|ψ) and F(|φ,|ψ) with optimal query complexity Θ(1/ε), which is not based on the SWAP test. Nonetheless, the sample complexity of estimating T(|φ,|ψ) and F(|φ,|ψ) remains unsolved. The prior best sample complexity upper bound is O(1/ε4) due to the folklore approach just mentioned, while the prior best sample complexity lower bound is only Ω(1/ε2) as noted in [39]. These naturally raise a question:

Can we improve the folklore sample complexity O(1/ε4)
for estimating T(|φ,|ψ) and F(|φ,|ψ)?

Surprisingly, we give a positive answer to this question by providing a novel quantum algorithm with optimal sample complexity Θ(1/ε2) for ε-estimating T(|φ,|ψ) and F(|φ,|ψ), matching the lower bound noted in [39].

We formally state our main result as follows.

Theorem 1 (Optimal quantum estimators for pure-state trace distance and square root fidelity, Theorem 14 restated).

Given sample access to two n-qubit pure states |φ and |ψ, T(|φ,|ψ) and F(|φ,|ψ) can be ε-estimated on a quantum computer with sample complexity O(1/ε2).

We summarize the complexity of pure-state trace distance and fidelity estimations in Table 1.

Table 1: Quantum complexity for pure-state trace distance and fidelity estimations.
Complexity Type Trace Distance Square Root Fidelity Squared Fidelity
Sample Upper Bound
O(1/ε4) folklore
O(1/ε2) this work
O(1/ε4) folklore
O(1/ε2) this work
O(1/ε2)
[9]
Sample Lower Bound
Ω(1/ε2)
[39]
Ω(1/ε2)
[1, 39]
Ω(1/ε2)
[1]
Query Upper Bound
O(1/ε)
[39]
O(1/ε)
[39]
O(1/ε)
[9, 8]
Query Lower Bound
Ω(1/ε)
[39]
Ω(1/ε)
[7, 32, 39]
Ω(1/ε)
[7, 32]

Our quantum algorithm in Theorem 1 is quite different from the quantum query algorithm proposed in [39] and those under the framework of the SWAP test. Its key component is a samplized phase estimation of the product of two Householder reflections. To this end, we also extend the samplizer (for mixed states) employed in [43] to (multi-)samplizer for pure states, which is an algorithmic tool of independent interest.

Organization of this paper.

We will introduce the techniques in our quantum algorithm and the optimality of our (multi-)samplizer for pure states in Section 2, and give a brief review of related work in Section 3. Preliminaries are given in Section 4. A meta-algorithm using Householder reflections for estimating the trace distance and fidelity will be presented in Section 5. The samplizer for pure states will be defined and implemented in Section 6. The complete algorithm will be presented in Section 7. Optimality and lower bounds will be shown in Section 8.

2 Techniques

In this section, we introduce the observations and techniques for achieving our results. We first introduce our quantum algorithm in Sections 2.1 and 2.2, and then discuss the lower bounds and optimality in Section 2.3.

2.1 Properties of the product of Householder reflections

The first property of trace distance and square root fidelity we need to notice is that for any two pure quantum states |φ and |ψ, it always holds that

(T(|φ,|ψ))2+(F(|φ,|ψ))2=1. (5)

Equation 5 allows us to represent the trace distance and the square root fidelity through trigonometric functions, i.e., one can assume that T(|φ,|ψ)=cos(γ) and F(|φ,|ψ)=sin(γ) for some real number γ[0,π2]. This suggests us to estimate T(|φ,|ψ) and F(|φ,|ψ) at the same time by estimating the value of γ. To this end, our major observation is that γ appears to be encoded in the product of the reflection operators about the vectors |φ and |ψ.

For convenience, suppose that |φ and |ψ are two distinguishable pure quantum states, i.e., T(|φ,|ψ)0. Let Rφ=I2|φφ| and Rψ=I2|ψψ| be the reflection operators about |φ and |ψ, respectively. Our key observation (Lemma 8) is that the pure quantum state |φ lies in the subspace spanned by two eigenvectors |Φ± of RφRψ with eigenvalues ei2γ, respectively. Specifically, |φ can be represented as

|φ=12(|Φ++|Φ), where RφRψ|Φ±=ei2γ|Φ±. (6)

According to the above observation, if we have quantum query access to the two reflection operators Rφ and Rψ, then we can obtain an ε-estimate of the value γ, denoted by γ~, via the quantum phase estimation (cf. [33, Section 5.2]) of RφRψ on the pure quantum state |φ, by using O(1/ε) queries to (controlled-)Rφ and (controlled-)Rψ, despite that |φ is not an eigenvector of RφRψ. Finally, Θ(ε)-estimates of trace distance and square root fidelity are given by T(|φ,|ψ)cos(γ~) and F(|φ,|ψ)sin(γ~) (see Lemma 9 for details). For illustration, the quantum circuit for this specific quantum phase estimation is given in Figure 2.

Figure 2: Phase estimation of RφRψ on |φ.

2.2 Multi-samplizer for pure states

The samplizer employed in [43] is a tool that allows us to convert quantum query algorithms to quantum sample algorithms (the latter use samples of quantum states as input). The algorithm outlined in Figure 2 can be treated as a quantum query algorithm with the two reflection operators Rφ and Rψ being the quantum query oracles. Now to convert this quantum query algorithm to a quantum sample algorithm using samples of |φ and |ψ, we define the notion of multi-samplizer for pure states, extending the samplizer in [43].

Definition 2 (Multi-samplizer for pure states, Definition 12 restated).

A k-samplizer for n-qubit pure states, denoted as 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾𝗉𝗎𝗋𝖾, is a converter such that: for any quantum query algorithm 𝒜U1,U2,,Uk with n-qubit quantum unitary oracles U1,U2,,Uk and any n-qubit pure states |ψ1,|ψ2,,|ψk, the quantum circuit instance 𝒜Rψ1,Rψ2,,Rψk can be implemented to precision δ in diamond norm by using samples of |ψ1,|ψ2,,|ψk, i.e.,

𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾δ𝗉𝗎𝗋𝖾𝒜U1,U2,,Uk[|ψ1,|ψ2,,|ψk]𝒜Rψ1,Rψ2,,Rψkδ. (7)

Using the notion of multi-samplizer for pure states in Definition 2, we can estimate the trace distance and square root fidelity between pure quantum states by extending the approach in Figure 2. Let 𝖰𝖯𝖤tU be the quantum circuit for the phase estimation of U without specifying the input states (see Figure 3), which uses t qubits to store the estimation result of the phase. Then, the quantum circuit in Figure 2 (without specifying the input state |0t|φ) can be described by 𝒜Rφ,Rψ, which is a specialization of the quantum query algorithm 𝒜U1,U2𝖰𝖯𝖤tU1U2 with t=Θ(log(1/ε)). The algorithm is informally outlined as follows (see Algorithm 1 for the formal version).

Pure-state trace distance and fidelity estimations (informal):

Input: Pure quantum states |φ and |ψ.

Output: ε-estimates of T(|φ,|ψ) and F(|φ,|ψ).

  1. 1.

    Let t=Θ(log(1/ε)) and 𝒜U1,U2𝖰𝖯𝖤tU1U2.

  2. 2.

    Prepare the quantum state ρ𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾0.01𝗉𝗎𝗋𝖾𝒜U1,U2[|φ,|ψ](|00|t|φφ|).

  3. 3.

    Obtain an ε-estimate γ~ of γ by measuring the first t qubits of ρ.

  4. 4.

    Return cos(γ~) and sin(γ~) as the estimates of T(|φ,|ψ) and F(|φ,|ψ), respectively.

To see the correctness of the above informally stated algorithm, we note that for any 2-samplizer 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾𝗉𝗎𝗋𝖾, we have

𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾0.01𝗉𝗎𝗋𝖾𝒜U1,U2[|φ,|ψ]𝒜Rφ,Rψ0.01. (8)

Since an ε-estimate of γ can be obtained with high probability, say 0.99, by measuring the state 𝒜Rφ,Rψ|0t|φ (in the computational basis), one can obtain an ε-estimate of γ with probability 0.95 by measuring the following state

𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾0.01𝗉𝗎𝗋𝖾𝒜U1,U2[|φ,|ψ](|00|t|φφ|). (9)

Let γ~ be the ε-estimate of γ obtained from the above process. Then, we have that cos(γ~) and sin(γ~) are Θ(ε)-estimates of T(|φ,|ψ) and F(|φ,|ψ), respectively, due to the observation introduced in Section 2.1.

To complete our approach, we provide an efficient implementation of the multi-samplizer for pure states.

Theorem 3 (Implementation of multi-samplizer for pure states, Theorem 13 restated).

There is an implementation of multi-samplizer for pure states 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾𝗉𝗎𝗋𝖾 such that if 𝒜U1,U2,,Uk uses Qj queries to Uj for each 1jk, then 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾δ𝗉𝗎𝗋𝖾𝒜U1,U2,,Uk[|ψ1,|ψ2,,|ψk] can be implemented by using

O(Qjδi=1kQi) (10)

samples of |ψj for each 1jk.

Using the efficient implementation of multi-samplizer for pure states given in Theorem 3 (with k2, Q1=Q2O(1/ε) and δ0.01), the quantum channel 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾0.01𝗉𝗎𝗋𝖾𝒜U1,U2[|φ,|ψ] can be implemented by using O(1/ε2) samples of |φ and |ψ. This yields the upper bounds stated in Theorem 1 (see Theorem 14 for details).

 Remark 4.

Here, we clarify the difference between the samplizer defined in [43, Definition I.1] and the (multi-)samplizer for pure states defined in Definition 2.

  1. 1.

    Types of oracles: The samplizer in [43] requires the oracle to be a (scaled) block-encoding of the density operator of a mixed quantum state. By comparison, the samplizer for pure states in Definition 2 requires the oracle to be the reflection operator about a pure state. More discussions on the relation between the two types of samplizers are given in [42, Appendix A].

  2. 2.

    Single/multiple oracles: The samplizer in [43] only allows a single oracle, while the multi-samplizer for pure states in Definition 2 allows multiple oracles.

  3. 3.

    Sample complexity: The sample complexity of the samplizer in [43] is O~(Q2/δ) where O~() suppresses polylogarithmic factors in Q and 1/δ, while the sample complexity of the k-samplizer for pure states given in Theorem 3 is O(Q2/δ) (without polylogarithmic factors) for constant k.

  4. 4.

    Optimality: The optimality of the samplizer in [43] is shown via a reduction of Hamiltonian simulation. However, the same reduction does not work for the multi-samplizer for pure states in Definition 2. To show the optimality of the multi-samplizer for pure states, our proof uses the algorithm for pure-state trace distance estimation given in Section 2.1 and is also based on the optimal sample lower bound for pure-state trace distance estimation (see Section 8.2 for details).

2.3 Optimality

Our quantum algorithm in Theorem 1 for pure-state trace distance and square root fidelity estimations is sample-optimal due to the sample complexity lower bound Ω(1/ε2) noted in [39]. Based on these, we show a matching sample complexity lower bound (up to a constant factor) for the k-samplizer for pure states when k is constant.

Theorem 5 (Optimality of the samplizer for pure states, Theorem 17 restated).

For any k-samplizer for pure states, 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾𝗉𝗎𝗋𝖾, if a quantum query algorithm 𝒜U1,U2,,Uk uses Qj queries to Uj for each j, then the implementation of 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾δ𝗉𝗎𝗋𝖾𝒜U1,U2,,Uk[|ψ1,|ψ2,,|ψk] requires Ω(Qj2/δ) samples of |ψj for each j.

Proof sketch.

To derive a sample lower bound for the samplizer, we need the meta-algorithm 𝒜U1,U2 for estimating T(|φ,|ψ), which is based on the observation in Section 2.1 and uses the phase estimation. As will be shown in Corollary 10, this meta-algorithm 𝒜U1,U2 makes O(1/ε) queries to the reflection operators U1Rφ and U2Rψ. Suppose that there is an implementation of the (multi-)samplizer for pure states 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾𝗉𝗎𝗋𝖾 with sample complexity 𝖲(Q,δ), meaning that we can implement 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾δ𝗉𝗎𝗋𝖾V1,V2[|ψ1,|ψ2] by using 𝖲(Q,δ) samples of |ψ1 and |ψ2 for every quantum query algorithm V1,V2 that makes Q queries to V1 and V2. On the other hand, 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾0.01𝗉𝗎𝗋𝖾𝒜U1,U2[|φ,|ψ] is an ε-estimator for T(|φ,|ψ) with sample complexity 𝖲(Θ(1/ε),0.01), while any ε-estimator for T(|φ,|ψ) requires sample complexity Ω(1/ε2), which gives 𝖲(Θ(1/ε),0.01)Ω(1/ε2). Hence, we can further obtain 𝖲(Q,δ)Ω(Q2/δ) using the properties of 𝖲(Q,δ). More details will be presented in Theorem 16.

It is worth mentioning that the sample complexity lower bound for the samplizer for pure states is based on the matching lower bound for pure-state trace distance and square root fidelity estimations, in sharp contrast to the proof for the optimality of the general samplizer in [43] (as discussed in Remark 4).

3 Related Work

There are also a few other approaches to estimating trace distance and fidelity in the literature. Except for those based on quantum state tomography [18, 21, 34], entanglement witnesses [37, 19, 20] are a practical technique for estimating the fidelity of certain pure states using few measurements; and direct fidelity estimation [13] is designed for pure-state fidelity estimation using only Pauli measurements. In [25], classical shadows were used to estimate the fidelity between a pure state and a mixed state. A distributed quantum algorithm for pure-state squared fidelity estimation was proposed in [1], which was recently extended to the case with limited quantum computation in [2, 17]. An optimal quantum query algorithm for pure-state trace distance and square root fidelity estimations was proposed in [39].

For the case of mixed quantum states, estimating their fidelity are known to have efficient quantum algorithms [44, 40, 14, 30]; especially, in [14], they proposed a sample-efficient quantum algorithm for fidelity estimation with sample complexity O~(r5.5/ε12), where r is the rank of mixed quantum states and ε is the desired additive error. Also, estimating the trace distance are known to have efficient quantum algorithms [40, 41, 29]; especially, in [41], they proposed a sample-efficient quantum algorithm for trace distance estimation with sample complexity O~(r2/ε5). Apart from estimation, the certification of d-dimensional mixed quantum states is highly related and was studied in [3], where they provided quantum algorithms that determine whether two mixed quantum states are identical or ε-far with sample complexity Θ(d/ε2) (w.r.t. trace distance) and Θ(d/ε) (w.r.t. infidelity), which are optimal due to the lower bounds in [35].

4 Preliminaries

In this section, we introduce different norms used in this paper and list the quantum algorithmic tools essential for designing our quantum algorithms.

4.1 Norms

4.1.1 Vector norms

The 1-norm (a.k.a. Taxicab norm or Manhattan norm) of a d-dimensional real-valued vector v=(v0,v1,,vd1)Td is denoted by

v1=j=0d1|vj|. (11)

The total variation distance between two d-dimensional probability distributions p,qd (treated as real-valued vectors) is denoted by

dTV(p,q)=12pq1. (12)

A d-dimensional (pure) quantum state is described by a complex-valued vector

|ψ=j=0d1αj|jd, (13)

where αj for each 0j<d is a complex number and {|j} is the computational basis. The inner product of two vectors |φ=j=0d1βj|j and |ψ=j=0d1αj|j is denoted by

φ|ψ=j=0d1βjαj, (14)

where z is the complex conjugate of the complex number z. The 2-norm (a.k.a. Euclidean norm) of |ψ is denoted by

|ψ=ψ|ψ. (15)

4.1.2 Matrix norms

A d-dimensional linear operator is described by a d-dimensional matrix Ad×d. The matrix norm induced by vector 2-norm (a.k.a. operator norm and spectral norm) is denoted by

A=sup|ψd:|ψ0A|ψ|ψ. (16)

The Schatten 1-norm (a.k.a. trace norm and nuclear norm) of A is denoted by

Atr=tr(|A|)=tr(AA), (17)

where

tr(A)=j=0d1j|A|j. (18)

4.2 Diamond norm

A d-dimensional superoperator is described by a linear map on d-dimensional linear operators, Φ:d×dd×d. The diamond norm (a.k.a completely bounded trace norm) of Φ is denoted by

Φ=supXd2×d2:Xtr1(Φd)Xtr, (19)

where the superoperator d is the identity operator. It is noteworthy that the diamond distance between two completely positive and trace-preserving maps (a.k.a. quantum channels) and is denoted by .

4.3 Quantum phase estimation

Quantum phase estimation [27] is a basic quantum subroutine, which was used in Shor’s quantum algorithm for factorization [36]. Here, we use the version in [33].

Theorem 6 (Quantum phase estimation, [33, Section 5.2]).

Suppose that U is a unitary operator. There is a quantum circuit 𝖰𝖯𝖤ε,δU using O(1/εδ) queries to controlled-U that performs the transform

𝖰𝖯𝖤ε,δU:|0|ψ|λ~|ψ (20)

for any eigenvector |ψ of U with U|ψ=ei2πλ and λ[0,1), where if we measure |λ~ in the computational basis (with some classical postprocessing), then with probability at least 1ε we will obtain a real number λ~[0,1) satisfying

min{|λ~λ|,1|λ~λ|}<δ. (21)

An implementation of the quantum phase estimation in Theorem 6 is also given in [33, Section 5.2] (see Figure 3), where the parameter t is chosen to be t=Θ(log(1/εδ)) and QFTt denotes the unitary operator for quantum Fourier transform

QFTt:|j12tk=02t1ei2πjk/2t|k. (22)

In addition to the queries to the controlled-U2j gates, the implementation in Figure 3 uses t Hadamard gates and an inverse t-qubit QFT. In [22], it was shown that an (inverse) t-qubit QFT can be implemented by using O(tlogt) two-qubit quantum gates.

Figure 3: Phase estimation of U on |ψ.

4.4 Density matrix exponentiation

Density matrix exponentiation, also called sample-based Hamiltonian simulation, was proposed in [31, 26, 16], which allows us to approximately implement the unitary operator eiρt by using identical copies of mixed quantum states ρ.

Theorem 7 ([26, Theorem 2]).

Given sample access to a mixed quantum state ρ, for every 0<δ1/6 and t6πδ, it is necessary and sufficient to use Θ(t2/δ) samples of ρ to implement a quantum channel that is δ-close to (controlled-)eiρt in diamond norm. Moreover, the implementation uses additional O(nt2/δ) one- and two-qubit quantum gates, if ρ is an n-qubit quantum state.

5 Estimation with Reflections

In this section, we study how to estimate the trace distance and square root fidelity between pure quantum states given their Householder reflection operators. We first introduce an important property of the product of two Householder reflections in Section 5.1. Then, using this property, in Section 5.2 we provide a meta-algorithm based on quantum phase estimation.

5.1 Product of Householder reflections

For a unit vector |ψ, we use Rψ=I2|ψψ| to denote the Householder reflection about |ψ. The following is the key property of the product of Householder reflections that enables our quantum algorithm for pure-state trace distance and fidelity estimations. We use arg(a+bi)=arctan(b/a) to denote the argument of a complex number a+bi.

Lemma 8.

Suppose that |φ and |ψ are two unit vectors such that |φ|ψ|1. Let

|φ=|ψφ|ψ|φ|ψφ|ψ|φ. (23)

Let θ=arg(φ|ψ) and θ=arg(φ|ψ). Then,

|Φ±=12(|φ±ei(θθ+π2)|φ). (24)

are unit eigenvectors of RφRψ with eigenvalues ei(π2γ), where γ=arcsin(|φ|ψ|).

Proof.

Since |ψφ=span{|φ,|φ}, we can represent |ψ in terms of |φ and |φ as follows:

|ψ =φ|ψ|φ+φ|ψ|φ (25)
=eiθ|φ|ψ||φ+eiθ|φ|ψ||φ (26)
=eiθsin(γ)|φ+eiθcos(γ)|φ. (27)

Then, we write out an orthonormal basis of Rψφ, namely the vectors obtained by applying the reflection Rψ on |φ and |φ:

Rψ|φ =|φ2ψ|φ|ψ, (28)
Rψ|φ =|φ2ψ|φ|ψ. (29)

By Equations 27, 28, and 29, we write the orthonormal basis {RφRψ|φ,RφRψ|φ} of RφRψφ as follows:

RφRψ|φ =Rφ(|φ2ψ|φ|ψ) (30)
=|φ2ψ|φ|ψ+4|ψ|φ|2|φ (31)
=|φ2eiθsin(γ)|ψ+4sin2(γ)|φ (32)
=(2sin2(γ)1)|φ2ei(θθ)sin(γ)cos(γ)|φ (33)
=cos(2γ)|φei(θθ)sin(2γ)|φ, (34)
RφRψ|φ =Rφ(|φ2ψ|φ|ψ) (35)
=|φ2ψ|φ|ψ+4φ|ψψ|φ|φ (36)
=|φ2eiθcos(γ)|ψ+4ei(θθ)sin(γ)cos(γ)|φ (37)
=2ei(θθ)sin(γ)cos(γ)|φ+(12cos2(γ))|φ (38)
=ei(θθ)sin(2γ)|φcos(2γ)|φ. (39)

Combining the above, we can verify the following identity:

RφRψ|Φ± =12RφRψ(|φ±ei(θθ+π2)|φ) (40)
=12(RφRψ|φ±ei(θθ+π2)RφRψ|φ) (41)
=12[(cos(2γ)|φei(θθ)sin(2γ)|φ)
±(isin(2γ)|φei(θθ+π2)cos(2γ)|φ)] (42)
=12(ei(π2γ)|φ±ei(θθ+32π2γ)|φ) (43)
=ei(π2γ)|Φ±, (44)

where the third equality is due to Equations 34 and 39.

5.2 A meta-algorithm

We observe the identity

|φ=12(|Φ++|Φ), (45)

where |Φ± are defined by Equation 24 and are eigenvectors of RφRψ as shown in Lemma 8. We provide a meta-algorithm by performing the quantum phase estimation of RφRψ on the quantum state |φ, as shown in Figure 2.

Lemma 9.

Suppose that ε,δ(0,1). Let t=Θ(log(1/εδ)). After measuring the first t qubits of 𝖰𝖯𝖤ε,δRφRψ|0t|φ in the computational basis (followed by proper classical postprocessing), with probability at least 1ε we will obtain a real number γ~[0,1) such that

||sin(πγ~π2)|F(|φ,|ψ)| <πδ, (46)
||cos(πγ~π2)|T(|φ,|ψ)| <πδ. (47)
Proof.

We first consider the special case that |φ=|ψ (up to a global phase), i.e., |φ|ψ|=1. In this case, RφRψ=I is the identity operator and |φ is an eigenvector of RφRψ with eigenvalue 1. Thus the quantum phase estimation procedure of 𝖰𝖯𝖤ε,δRφRψ|0t|φ will return γ~=0 with certainty. By simple calculations, we can verify that F(|φ,|ψ)=1=|sin(πγ~π2)| and T(|φ,|ψ)=0=|cos(πγ~π2)|.

In the rest of this proof, we consider the general case that |φ|ψ (up to a global phase), i.e., |φ|ψ|1. By Lemma 8, the eigenvalue of |Φ± with respect to the unitary operator RφRψ is ei(π2γ), where γ=arcsin(|φ|ψ|). By Theorem 6, we have

𝖰𝖯𝖤ε,δRφRψ|0t|φ =12(𝖰𝖯𝖤ε,δRφRψ|0t|Φ++𝖰𝖯𝖤ε,δRφRψ|0t|Φ) (48)
=12(|γ~+|Φ++|γ~|Φ), (49)

where if we measure the first t qubits, then with probability at least 1ε we will obtain a real number γ~[0,1) satisfying at least one of the following two inequalities:

min{|γ~(12γπ)|,1|γ~(12γπ)|}<δ, (50)
min{|γ~(12+γπ)|,1|γ~(12+γπ)|}<δ. (51)

To see Equation 46, we note that F(|φ,|ψ)=sin(γ) and

||sin(πγ~π2)|sin(γ)| min{|sin(πγ~π2)sin(γ)|,|sin(πγ~+π2)sin(γ)|} (52)
min{|(πγ~π2)γ|,π|(πγ~π2)γ|,
|(πγ~+π2)γ|,π|(πγ~+π2)γ|} (53)
<πδ, (54)

where the third inequality is because γ~ satisfies either Equation 50 or Equation 51. To see Equation 47, we note that T(|φ,|ψ)=cos(γ) and similarly we have

||cos(πγ~π2)|cos(γ)| min{|sin(πγ~)sin(γ+π2)|,|sin(πγ~+π)sin(γ+π2)|} (55)
min{|πγ~(γ+π2)|,π|πγ~(γ+π2)|,
|(πγ~+π)(γ+π2)|,π|(πγ~+π)(γ+π2)|} (56)
<πδ. (57)

We restate Lemma 9 with normalized additive error in the following corollary, which will be used as a subroutine in Section 7.

Corollary 10.

Suppose that ε,δ(0,1). Let t=Θ(log(1/εδ)). We can estimate the trace distance and square root fidelity between |φ and |ψ to within additive error δ with probability at least 1ε by measuring the first t qubits of 𝖰𝖯𝖤ε,δπRφRψ|0t|φ in the computational basis (followed by proper classical postprocessing).

6 Samplizer for Pure States

In this section, we define the samplizer for pure states and then provide an efficient implementation for it. Roughly speaking, a samplizer converts a quantum query algorithm to a quantum sample algorithm, where the query oracle and the sample of quantum states are related.

6.1 Definition

In our case of pure states, we consider the reflection oracle for pure states, defined as follows.

Definition 11 (Reflection oracle for pure states).

Let |ψ be a pure quantum state. The reflection oracle for |ψ is defined to be Rψ=I2|ψψ|.

We give the definition of (multi-)samplizer for pure states in terms of reflection oracles as follows.

Definition 12 (Multi-samplizer for pure states).

A k-samplizer for n-qubit pure states, denoted as 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾𝗉𝗎𝗋𝖾, is a converter from a quantum circuit family to a quantum channel family such that: for any δ>0, quantum circuit family 𝒜U1,U2,,Uk with query access to n-qubit unitary operators U1,U2,,Uk, and n-qubit pure states |ψ1,|ψ2,,|ψk,

𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾δ𝗉𝗎𝗋𝖾𝒜U1,U2,,Uk[|ψ1,|ψ2,,|ψk]𝒜Rψ1,Rψ2,,Rψkδ. (58)

The sample complexity of 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾𝗉𝗎𝗋𝖾 is a k-tuple (𝖲1,𝖲2,,𝖲k) for (k+1)-ary functions 𝖲j(x1,x2,,xk;y) such that if 𝒜U1,U2,,Uk uses Qj queries to Uj for each 1jk, then 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾δ𝗉𝗎𝗋𝖾𝒜U1,U2,,Uk[|ψ1,|ψ2,,|ψk] uses 𝖲j(Q1,Q2,,Qk;δ) samples of |ψj for each 1jk. Especially when k=1, we write 𝖲(x,y)𝖲1(x;y) for convenience.

Similarly, we can also define the (additional) time complexity of 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾𝗉𝗎𝗋𝖾 as a (k+1)-ary function 𝖳(x1,x2,,xk;y) such that if 𝒜U1,U2,,Uk uses Qj queries to Uj for each 1jk, then 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾δ𝗉𝗎𝗋𝖾𝒜U1,U2,,Uk[|ψ1,|ψ2,,|ψk] can be implemented by using T𝒜+𝖳(Q1,Q2,,Qk;δ) two-qubit gates, where T𝒜 is the number of two-qubit gates in 𝒜U1,U2,,Uk (excluding queries). Especially when k=1, we write 𝖳(x,y)𝖳(x;y) for convenience.

Our algorithms for trace distance and fidelity estimation employ a 2-samplizer for pure states, which will be formally described in Section 7. Our definition of samplizer for pure states is inspired by the general samplizer defined in [43], where the latter simulates quantum query algorithms with query access to block-encoding oracles for quantum states. Here, the block-encoding oracle input model is standard in quantum algorithms, e.g., Hamiltonian simulation [15] and solving systems of linear equations [12]. It is worth noting that for pure states, the reflection oracle is computationally equivalent to the block-encoding oracle up to a constant factor (cf. [11, Lemma 5.5]). The relationship between the samplizer for pure states and the general samplizer is further discussed in [42, Appendix A].

6.2 An efficient approach

We provide an efficient approach to the multi-samplizer for pure states as follows.

Theorem 13.

There is a k-samplizer for n-qubit pure states, 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾𝗉𝗎𝗋𝖾, with sample complexity (𝖲1,𝖲2,,𝖲k), where

𝖲j(Q1,Q2,,Qk;δ)=O(Qjδi=1kQi). (59)

Moreover, if a quantum query algorithm 𝒜U1,U2,,Uk uses Qj queries to Uj for 1jk, then the (additional) time complexity (compared to the original 𝒜U1,U2,,Uk) of 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾δ𝗉𝗎𝗋𝖾𝒜U1,U2,,Uk is

𝖳(Q1,Q2,,Qk;δ)=O(nδ(j=1kQj)2). (60)
Proof.

Let Qi=1kQi. For each 1jk, by Theorem 7 with tπ and δδ/Q, we can use O(Q/δ) samples of |ψj and O(nQ/δ) one- and two-qubit quantum gates to implement a quantum channel j that is (δ/Q)-close (in diamond norm) to (the controlled version of) the following unitary transformation

ei|ψjψj|π=I2|ψjψj|=Rψj. (61)

That is,

jRψjδQ. (62)

Suppose that the quantum circuit 𝒜Rψ1,Rψ2,,Rψk using queries to Rψ1,Rψ2,,Rψk is composed of a sequence of unitary operators:

𝒜Rψ1,Rψ2,,Rψk=GQ𝒪QG2𝒪2G1𝒪1G0, (63)

where Gq for each 1qQ can be implemented by one- and two-qubit quantum gates that do not depend on Rψ1,Rψ2,,Rψk, and 𝒪q for each 1qQ is (the controlled version of) Rψjq for some 1jqk. Then, we can implement 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾δ𝗉𝗎𝗋𝖾𝒜U1,U2,,Uk[|ψ1,|ψ2,,|ψk] as follows

𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾δ𝗉𝗎𝗋𝖾𝒜U1,U2,,Uk[|ψ1,|ψ2,,|ψk]GQjQG2j2G1j1G0. (64)

As jqRψjqδ/Q for each 1qQ, we conclude that

𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾δ𝗉𝗎𝗋𝖾𝒜U1,U2,,Uk[|ψ1,|ψ2,,|ψk]𝒜Rψ1,Rψ2,,Rψkδ. (65)

Therefore, the implementation given in Equation 64 is a valid k-samplizer for pure states.

We analyze the complexity of this implementation as follows. Since there are Qj queries to Rψj among 𝒪1,𝒪2,,𝒪Q, the number of samples of |ψj used in the implementation defined by Equation 64 is

QjO(Qδ)=O(QjQδ). (66)

Moreover, the number of one- and two-qubit quantum gates used in this implementation in addition to (the implementation of) G1,G2,,GQ is

i=1kQiO(nQδ)=O(nQ2δ). (67)

7 The Algorithm

In this section, we present a complete description of our quantum algorithm for pure-state trace distance and fidelity estimations in Algorithm 1, which combines the estimation algorithm using reflection oracles in Section 5 with the multi-samplizer for pure states in Section 6.

Algorithm 1 Quantum estimator for pure-state trace distance and fidelity estimations.

We state the result of our final algorithm in Theorem 14.

Theorem 14.

For ε(0,1), we can estimate the trace distance and square root fidelity between n-qubit pure states |φ and |ψ to within additive error ε with probability at least 2/3 by measuring the first t qubits of

𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾110𝗉𝗎𝗋𝖾𝒜U1,U2[|φ,|ψ](|00|t|φφ|) (68)

in the computational basis (followed by proper classical postprocessing), where 𝒜U1,U2𝖰𝖯𝖤110,επU1U2 and t=Θ(log(1/ε)). Here, the quantum channel 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾110𝗉𝗎𝗋𝖾𝒜U1,U2[|φ,|ψ] can be implemented by using O(1/ε2) samples of |φ and |ψ, and using O(n/ε2) two-qubit gates.

Proof.

The formal description of our algorithm is given in Algorithm 1. Now we will prove its correctness and analyze its complexity.

Correctness.

By Corollary 10, we know that the trace distance and square root fidelity between |φ and |ψ can be obtained with success probability at least 910 by measuring the first t qubits of the state 𝖰𝖯𝖤110,επRφRψ|0t|φ (followed by proper classical postprocessing). Thus we only have to show that the quantum state defined by Equation 68 is close to the pure quantum state 𝖰𝖯𝖤110,επRφRψ|0t|φ. To this end, by Definition 12, we have

𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾110𝗉𝗎𝗋𝖾𝒜U1,U2[|φ,|ψ]𝖰𝖯𝖤110,επRφRψ110. (69)

By applying each of them on the quantum state Ψ|00|t|φφ|, we have

𝖳(𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾110𝗉𝗎𝗋𝖾𝒜U1,U2[|φ,|ψ](Ψ),𝖰𝖯𝖤110,επRφRψΨ(𝖰𝖯𝖤110,επRφRψ))120. (70)

Therefore, the probability distribution of the outcomes from measuring (in the computational basis) the state 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾110𝗉𝗎𝗋𝖾𝒜U1,U2[|φ,|ψ](Ψ) is 110-close (in total variation distance) to that from measuring the state 𝖰𝖯𝖤110,επRφRψ|0t|φ (in the computational basis). This implies that the success probability of Algorithm 1 is at least 910110>23.

Complexity.

By Theorem 6 with ε110 and δεπ, the quantum query algorithm 𝒜U1,U2𝖰𝖯𝖤110,επU1U2 uses O(1/ε) queries to each of U1 and U2, and uses O(log(1/ε)loglog(1/ε)) two-qubit gates (due to the quantum Fourier transform). By the implementation of the multi-samplizer for pure states given in Theorem 13 with δ110 and Q1=Q2O(1/ε), we can implement the quantum channel 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾110𝗉𝗎𝗋𝖾𝒜U1,U2[|φ,|ψ] by using O(1/ε2) samples of each of |φ and |ψ. In addition, we also use one sample of |φ as (part of) the input of the quantum channel 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾110𝗉𝗎𝗋𝖾𝒜U1,U2[|φ,|ψ]. In total, we use O(1/ε2) samples of |φ and |ψ. Moreover, Algorithm 1 can be implemented by using

O(log(1ε)loglog(1ε))+O(nε2)=O(nε2) (71)

one- and two-qubit quantum gates, if |φ and |ψ are n-qubit pure quantum states.

8 Optimality

In this section, we first mention the matching lower bounds for pure-state trace distance and fidelity estimations in Section 8.1, and then show a matching lower bound for the implementation of multi-samplizer for pure states in Section 8.2.

8.1 Lower bounds for pure-state trace distance and fidelity estimations

For completeness, we collect the sample complexity lower bounds for estimating pure-state trace distance and fidelity in the following theorem.

Theorem 15 (Sample complexity lower bounds for pure-state closeness estimation, adapted from [1, 39]).

Given sample access to two single-qubit pure quantum states |φ and |ψ, it is necessary to use Ω(1/ε2) samples of them to ε-estimate

  1. (1)

    the trace distance T(|φ,|ψ) for ε(0,1),

  2. (2)

    the square root fidelity F(|φ,|ψ) for ε(0,1/4).

  3. (3)

    the squared fidelity F2(|φ,|ψ) for ε(0,1/2),

Proof.

Items 2 and 3 are directly implied by [1, Lemma 13 in the full version]. It remains to prove Item 1.

The sample complexity lower bound for pure-state trace distance estimation was already shown in [39, Theorem B.2] for ε(0,1/2). Here, we strengthen the lower bound to encompass a more general case that ε(0,1) and both the states |φ and |ψ are single-qubit, with a simple proof. To this end, we denote

|ψx=1x2|0+x|1 (72)

for x[0,1]. Let ε(0,1). Consider the following quantum hypothesis testing problem:

  • Given an unknown pure quantum state |φ, determine whether |φ is |ψ0 or |ψε, under the promise that |φ is in either case with equal probability.

The trace distance between |ψ0 and |ψε is

T(|ψ0,|ψε)=1|ψ0|ψε|2=ε. (73)

By the Holevo-Helstrom bound for quantum state discrimination [24, 23], we know that the above quantum hypothesis testing problem requires sample complexity Ω(1/ε2). On the other hand, any estimator for pure-state trace distance with additive error ε can be used to solve this task, thereby also requiring sample complexity Ω(1/ε2).

8.2 Lower bounds for (multi-)samplizers for pure states

It is trivial that for any k1, any (k+1)-samplizer for pure states can be used to implement a k-samplizer for pure states with the same sample complexity (by discarding the last pure state). To show the optimality of the multi-samplizer for pure states given in Theorem 13, it is sufficient to show the optimality of the 1-samplizer, given as follows.

Theorem 16.

For sufficiently large Q and every δ(0,1/9), any 1-samplizer for n-qubit pure states requires sample complexity 𝖲(Q,δ)=Ω(Q2/δ).

Although the lower bound given in Theorem 16 for the 1-samplizer for pure states is of the same order as the lower bound Ω(Q2/δ) for the general samplizer given in [43, Theorem III.4], we emphasize that prior lower bounds do not imply our lower bound in Theorem 16. We discuss related lower bounds as follows.

  1. 1.

    The lower bound Ω(Q2/δ) for general samplizer given in [43, Theorem III.4] is by reducing from the sample-based Hamiltonian simulation [26] via the optimal quantum query algorithm for Hamiltonian simulation [15] for time t=Θ(Q). The sample-based Hamiltonian simulation is a task for implementing eiρt with precision δ using samples of ρ. A lower bound O(t2/δ) on the sample complexity of sample-based Hamiltonian simulation is given in [26, Theorem 2], which is further reduced from distinguishing two mixed quantum states ρ(12) and ρ(12+Θ(1t)), where ρ(x)=x|00|+(1x)|11|. However, this reduction does not directly apply to the case of pure states.

  2. 2.

    One may wonder what happens if we consider the sample-based Hamiltonian simulation for pure states. Note that the unitary operator ei|ψψ|t is periodic with respect to t as ei|ψψ|2π=I. So the above idea will result in a lower bound of 𝖲(Q,δ)=Ω(1/δ) for 1-samplizer by taking Q=Θ(t)=Θ(1), due to the lower bound Ω(1/δ) given in [26, Theorem 4] for implementing ei|ψψ|t for constant t with precision δ.

Interestingly, our proof of Theorem 16 is based on a reduction from the pure-state trace distance estimation (whose lower bounds are previously presented in Section 8.1) instead of the sample-based Hamiltonian simulation [26].

Proof of Theorem 16.

Let 𝒜εU1,U2𝖰𝖯𝖤110,επU1U2. Then, by Corollary 10, measuring the quantum state 𝒜εRφ,Rψ|0t|φ can estimate the trace distance between two pure quantum states |φ and |ψ to within additive error ε with query complexity O(1/ε), where Rφ and Rψ are the reflection oracles for |φ and |ψ, respectively. Consider the two pure quantum states |ψ0|0 and |ψε1ε2|0+ε|1 employed in Theorem 15, where ε(0,1). Note that the reflection oracle Rψ0=I2|00| for |ψ0 is constant (with respect to ε). Then, measuring 𝒜εRψ0,Rψε|0 (note that |ψ0=|0) can estimate the trace distance between |ψ0 and |ψε to within additive error ε with probability at least 2/3, using O(1/ε) queries to Rψε. Therefore, using the quantum query algorithm 𝒜εU1,U2 for pure-state trace distance estimation, we can obtain a quantum query algorithm 𝒯U for distinguishing the two reflection operators Rψ0 and Rψε with probability at least 2/3, using O(1/ε) queries to U, promised that either U=Rψ0 or Rψε. Formally, the probability that 𝒯U accepts is given by Π𝒯U|02, where Π=|00|I measures the first qubits. Then,

  • 𝒯Rψ0 accepts with probability at least 2/3;

  • 𝒯Rψε accepts with probability at most 1/3.

Let 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾𝗉𝗎𝗋𝖾 be any 1-samplizer with sample complexity 𝖲(Q,δ). Then, 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾19𝗉𝗎𝗋𝖾𝒯U is a quantum channel family with sample complexity 𝖲(Θ(1/ε),1/9) such that

  • 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾19𝗉𝗎𝗋𝖾𝒯U[|ψ0](|00|) accepts with probability

    tr(Π𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾19𝗉𝗎𝗋𝖾𝒯U[|ψ0](|00|))2319=59, (74)
  • 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾19𝗉𝗎𝗋𝖾𝒯U[|ψε](|00|) accepts with probability

    tr(Π𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾19𝗉𝗎𝗋𝖾𝒯U[|ψε](|00|))13+19=49. (75)

Therefore, if |φ is promised to be either |ψ0 or |ψε, then, by a constant number (say, 9) of repetitions of 𝖲𝖺𝗆𝗉𝗅𝗂𝗓𝖾19𝗉𝗎𝗋𝖾𝒯U on input |φ, we can determine with probability at least 2/3 which is the case (by majority voting). This means that we can distinguish |ψ0 and |ψε with probability at least 2/3 with sample complexity 9𝖲(Θ(1/ε),1/9). On the other hand, using the same arguments as in Theorem 15, we know that distinguishing |ψ0 and |ψε requires sample complexity Ω(1/ε2). These together imply that 9𝖲(Θ(1/ε),1/9)Ω(1/ε2). Since the choice of ε(0,1) is arbitrary, by letting Q=Θ(1/ε), we further have the relation

𝖲(Q,19)cQ2 (76)

for sufficiently large Q, where c>0 is a universal constant. This is the desired inequality for the case of constant δ.

To show the inequality for arbitrarily small δ, we note that 𝖲(Q,δ) satisfies:

𝖲(Q1+Q2,δ1+δ2)𝖲(Q1,δ1)+𝖲(Q2,δ2) (77)

for any integers Q1,Q20 and real numbers δ0,δ1(0,1). This is because: to samplize any quantum query algorithm with Q1+Q2 queries to precision δ1+δ2, one can always first samplize the first part of Q1 queries to precision δ1 and then the second part of Q2 queries to precision δ2. Consequently, we further have the following properties:

  1. 1.

    𝖲(mQ,mδ)m𝖲(Q,δ) for any integers m,Q1 and real number δ>0.

  2. 2.

    𝖲(Q,δ1)𝖲(Q,δ2) for any integer Q1 and real numbers 0<δ1<δ2.

For sufficiently large Q and for every 0<δ<1/9, by taking m19δ1 (which gives 0<mδ1/9), we have

𝖲(Q,δ) 1m𝖲(mQ,mδ) (78)
1m𝖲(mQ,19) (79)
1mc(mQ)2 (80)
=c19δQ2 (81)
Ω(Q2δ), (82)

where the first inequality is due to property 1, the second inequality is due to property 2, and the third inequality is by Equation 76.

To complete the proof for general n2, the hard instance can be taken as |Ψ0=|ψ0|0(n1) and |Ψε=|ψε|0(n1).

As a corollary of Theorem 16, we have a matching sample lower bound for the implementation of k-samplizer for pure states for constant k.

Theorem 17.

For sufficient large Qj for each 1jk and every δ(0,1/9), any k-samplizer for pure states requires sample complexity

𝖲j(Q1,Q2,,Qk;δ)=Ω(Qj2δ) (83)

for each 1jk.

9 Conclusion

In this paper, we proposed a quantum algorithm for estimating the trace distance and square root fidelity between pure quantum states with optimal sample complexity, quadratically improving the long-standing folklore approach, answering the question raised in [39], and thereby completing the complexity picture for pure-state closeness estimation. Technically, our quantum algorithm requires new observations (the properties of the product of Householder reflections) and tools (the samplizer for pure states).

We therefore raise the following questions for future research.

  1. 1.

    Can we close the gap between the upper and lower bounds on the quantum query/sample complexities of estimating the quantities of mixed quantum states such as trace distance and fidelity?

  2. 2.

    Can we find more applications of the samplizer for pure states?

  3. 3.

    After the distributed quantum algorithm for pure-state squared fidelity estimation in [1], the trade-off between the sample complexity and quantum communication was recently settled in [2, 17]. A further question is: what is the sample complexity of estimating the square root fidelity and trace distance between pure states with limited quantum communication?

  4. 4.

    Following Question 3, can we implement a samplizer (for pure states) with distributed quantum computation or with limited quantum communication?

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] Srinivasan Arunachalam and Louis Schatzki. Generalized inner product estimation with limited quantum communication. In Proceedings of the 42nd International Symposium on Theoretical Aspects of Computer Science, pages 11:1–11:17, 2025. doi:10.4230/LIPIcs.STACS.2025.11.
  • [3] Costin Bădescu, Ryan O’Donnell, and John Wright. Quantum state certification. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, pages 503–514, 2019. doi:10.1145/3313276.3316344.
  • [4] Joonwoo Bae and Leong-Chuan Kwek. Quantum state discrimination and its applications. Journal of Physics A: Mathematical and Theoretical, 48(8):083001, 2015. doi:10.1088/1751-8113/48/8/083001.
  • [5] Adriano Barenco, André Berthiaume, David Deutsch, Artur Ekert, Richard Jozsa, and Chiara Macchiavello. Stabilization of quantum computations by symmetrization. SIAM Journal on Computing, 26(5):1541–1557, 1997. doi:10.1137/S0097539796302452.
  • [6] Stephen M. Barnett and Sarah Croke. Quantum state discrimination. Advances in Optics and Photonics, 1(2):238–278, 2009. doi:10.1364/AOP.1.000238.
  • [7] 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.
  • [8] 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.
  • [9] 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.
  • [10] Anthony Chefles. Quantum state discrimination. Contemporary Physics, 41(6):401–424, 2000. doi:10.1080/00107510010002599.
  • [11] Kean Chen, Qisheng Wang, and Zhicheng Zhang. Local test for unitarily invariant properties of bipartite quantum states. IEEE Transactions on Information Theory, 2026. doi:10.1109/TIT.2026.3697790.
  • [12] Pedro C. S. Costa, Dong An, Yuval R. Sanders, Yuan Su, Ryan Babbush, and Dominic W. Berry. Optimal scaling quantum linear-systems solver via discrete adiabatic theorem. PRX Quantum, 3(4):040303, 2022. doi:10.1103/PRXQuantum.3.040303.
  • [13] 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.
  • [14] András Gilyén and Alexander Poremba. Improved quantum algorithms for fidelity estimation. ArXiv e-prints, 2022. arXiv:2203.15993.
  • [15] András Gilyén, Yuan Su, Guang Hao Low, and Nathan Wiebe. Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, pages 193–204, 2019. doi:10.1145/3313276.3316366.
  • [16] Byeongseon Go, Hyukjoon Kwon, Siheon Park, Dhrumil Patel, and Mark M. Wilde. Density matrix exponentiation and sample-based Hamiltonian simulation: Non-asymptotic analysis of sample complexity. ArXiv e-prints, 2024. arXiv:2412.02134.
  • [17] Weiyuan Gong, Jonas Haferkamp, Qi Ye, and Zhihan Zhang. On the sample complexity of purity and inner product estimation. ArXiv e-prints, 2024. doi:10.48550/arXiv.2410.12712.
  • [18] David Gross, Yi-Kai Liu, Steven T. Flammia, Stephen Becker, and Jens Eisert. Quantum state tomography via compressed sensing. Physical Review Letters, 105(15):150401, 2010. doi:10.1103/PhysRevLett.105.150401.
  • [19] Otfried Gühne, Chao-Yang Lu, Wei-Bo Gao, and Jian-Wei Pan. Toolbox for entanglement detection and fidelity estimation. Physical Review A, 76(3):030305(R), 2007. doi:10.1103/PhysRevA.76.030305.
  • [20] Otfried Gühne and Géza Tóth. Entanglement detection. Physics Reports, 474(1–6):1–75, 2009. doi:10.1016/j.physrep.2009.02.004.
  • [21] Jeongwan Haah, Aram W. Harrow, Zhengfeng Ji, Xiaodi Wu, and Nengkun Yu. Sample-optimal tomography of quantum states. IEEE Transactions on Information Theory, 63(9):5628–5641, 2017. doi:10.1109/TIT.2017.2719044.
  • [22] Lisa Hales and Sean Hallgren. An improved quantum fourier transform algorithm and applications. In Proceedings of the 41st Annual Symposium on Foundations of Computer Science, pages 515–525, 2000. doi:10.1109/SFCS.2000.892139.
  • [23] Carl W. Helstrom. Detection theory and quantum mechanics. Information and Control, 10(3):254–291, 1967. doi:10.1016/S0019-9958(67)90302-6.
  • [24] Alexander S. Holevo. Statistical decision theory for quantum systems. Journal of Multivariate Analysis, 3(4):337–394, 1973. doi:10.1016/0047-259X(73)90028-6.
  • [25] Hsin-Yuan Huang, Richard Kueng, and John Preskill. Predicting many properties of a quantum system from very few measurements. Nature Physics, 16(10):1050–1057, 2020. doi:10.1038/s41567-020-0932-7.
  • [26] Shelby Kimmel, Cedric Yen-Yu Lin, Guang Hao Low, Maris Ozols, and Theodore J. Yoder. Hamiltonian simulation with optimal sample complexity. npj Quantum Information, 3(1):1–7, 2017. doi:10.1038/s41534-017-0013-7.
  • [27] A. Yu. Kitaev. Quantum measurements and the Abelian stabilizer problem. ArXiv e-prints, 1995. arXiv:quant-ph/9511026.
  • [28] 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.
  • [29] François Le Gall, Yupan Liu, and Qisheng Wang. Space-bounded quantum state testing via space-efficient quantum singular value transformation. Computational Complexity, 2026. doi:10.1007/s00037-025-00284-5.
  • [30] Nana Liu, Qisheng Wang, Mark M. Wilde, and Zhicheng Zhang. Quantum algorithms for matrix geometric means. npj Quantum Information, 11:101, 2025. doi:10.1038/s41534-025-00973-7.
  • [31] Seth Lloyd, Masoud Mohseni, and Patrick Rebentrost. Quantum principal component analysis. Nature Physics, 10(9):631–633, 2014. doi:10.1038/nphys3029.
  • [32] 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.
  • [33] Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press, 2010. doi:10.1017/CBO9780511976667.
  • [34] Ryan O’Donnell and John Wright. Efficient quantum tomography. In Proceedings of the 48th Annual ACM Symposium on Theory of Computing, pages 899–912, 2016. doi:10.1145/2897518.2897544.
  • [35] Ryan O’Donnell and John Wright. Quantum spectrum testing. Communications in Mathematical Physics, 387(1):1–75, 2021. doi:10.1007/s00220-021-04180-1.
  • [36] Peter W. Shor. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Journal on Computing, 26(5):1484–1509, 1997. doi:10.1137/S0097539795293172.
  • [37] Yuuki Tokunaga, Takashi Yamamoto, Masato Koashi, and Nobuyuki Imoto. Fidelity estimation and entanglement verification for experimentally produced four-qubit cluster states. Physical Review A, 74(2):020301(R), 2006. doi:10.1103/PhysRevA.74.020301.
  • [38] Gregory Valiant and Paul Valiant. Estimating the unseen: improved estimators for entropy and other properties. Journal of the ACM, 64(6):37:1–37:41, 2017. doi:10.1145/3125643.
  • [39] 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.
  • [40] 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.
  • [41] 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.
  • [42] 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.
  • [43] Qisheng Wang and Zhicheng Zhang. Time-efficient quantum entropy estimator via samplizer. IEEE Transactions on Information Theory, 71(12):9569–9599, 2025. doi:10.1109/TIT.2025.3576137.
  • [44] 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.