1 Introduction

Quantum computing has originated in the early to mid-80s in the works by Feynman in [4] as a novel computational scheme using quantum mechanical principles. Similar ideas have as well been formulated earlier, e.g., in the introduction of [11], in [1] and [13]. For an introduction to quantum computing, the reader is referred to [12].

Since then, a considerable number of algorithms have been proposed in the past four decades for a wide range of applications such as Grover’s algorithms for search problems (see [6]), integer factoring (see [14]) or the solution of systems of linear equations (see [9]). One of their vital building blocks is the quantum phase estimation (QPE).

The original algorithm was presented in [10]. We refer here to QPE by the ‘textbook’ method as described, e.g., in [12, Sect. 5.2]. Let a unitary operator together with one of its eigenvectors be given. The aim is the calculation of the phase of the associated eigenvalue, which is represented by an ancilla quantum register.

This article has two major goals: The primary one is the derivation of an alternative quantum phase estimation that has more convenient mathematical properties and contains the textbook version as a special case. Our method can be interpreted as the operator exponential of a multiplier, which only depends on the number of ancilla qubits used to represent the phase, and the Hamiltonian associated to the aforementioned target operator. The used techniques are centered around calculus rules for a class of projection-based tensor decompositions of the Hamiltonian. The latter results and their application are the secondary goal of this paper.

The rest of this article is organized as follows: In Sect. 2, we introduce the notation and gather central results that are used throughout the text. In Sect. 3, we derive calculus rules for a class of operators that admit a projection-based tensor decomposition and give some instructive examples. Our alternative quantum phase estimation is introduced in Sect. 4, and the results of the previous section are used to derive a Hamiltonian-based representation. Additionally, we propose a recursive approach in Sect. 5 to decompose our alternative quantum phase estimation.

2 Notation and preliminaries

Let \({\mathcal {H}}\) be a finite-dimensional, complex Hilbert space. For a lowercase index n, we denote \(N = 2^n\) and the Hilbert space \({\mathcal {H}}_N \simeq {\mathbb {C}}^N\) with basis \((\left| {j}\right\rangle )_{j = 0}^{N - 1}\). The latter is the computational base of an n-qubit quantum computer. Clearly we have for \(n_0,n_1 \in {\mathbb {N}}\) with \(n = n_0 + n_1\) and \(N_j = 2^{n_j}\), \(j = 0, 1\) that \(N = N_0 \cdot N_1\) and \({\mathcal {H}}_N \simeq {\mathcal {H}}_{N_0} \otimes {\mathcal {H}}_{N_1}\).

For a Hilbert space \({\mathcal {H}}\) as above we denote the set of all continuous, linear operators on \({\mathcal {H}}\) by \({\mathcal {L}}({\mathcal {H}})\). The identity on \({\mathcal {H}}\) is denoted by \(\textrm{id}_{{\mathcal {H}}}\). For \({\mathcal {H}}= {\mathcal {H}}_N\), we may just write \(\textrm{id}_N = \textrm{id}_{{\mathcal {H}}_N}\). Two operators \(A, B \in {\mathcal {L}}({\mathcal {H}})\) are said to commute if \(AB = BA\) is true.

We identify operators with their matrix representation in the computational basis unless stated otherwise. The indices of vector and matrices start at zero. Let \(A \in {\mathcal {L}}({\mathcal {H}}_{N_0})\) and \(B \in {\mathcal {L}}({\mathcal {H}}_{N_1})\) be given. Their Kronecker product (see [12, eq. (2.50)]) \(A \otimes B \in {\mathcal {L}}({\mathcal {H}}_{N_0} \otimes {\mathcal {H}}_{N_1})\) is defined by the matrix

$$\begin{aligned} A \otimes B = \left[ \begin{array}{ccc} a_{0,0} \cdot B &{} \cdots &{} a_{0,N - 1} \cdot B\\ \vdots &{} \ddots &{} \vdots \\ a_{N-1,0} \cdot B &{} \cdots &{} a_{N-1,N-1} \cdot B \end{array} \right] . \end{aligned}$$

It is also the matrix representation of the tensor product of the two operators.

Let \(N \in {\mathbb {N}}\) and define \(\omega := \exp (\textrm{i}\hspace{0.55542pt}\frac{2\pi }{N})\). The quantum Fourier transform is defined as the matrix \(\textrm{QFT}_N \in {\mathcal {L}}({\mathcal {H}}_N)\) with entries \((\textrm{QFT}_N)_{j,k} = \dfrac{1}{\sqrt{N}}\omega ^{j k}\) for \(j, k = 0, \dots , N - 1\). Hence, we have

$$\begin{aligned} \textrm{QFT}_N = \frac{1}{\sqrt{N}} \left[ \begin{array}{ccccc} 1 &{} 1 &{} 1 &{} \cdots &{} 1 \\ 1 &{} \omega &{} \omega ^2 &{} \cdots &{} \omega ^{N - 1} \\ 1 &{} \omega ^2 &{} \omega ^4 &{} \cdots &{} \omega ^{2(N - 1)} \\ \vdots &{} \vdots &{} \vdots &{} &{} \vdots \\ 1 &{} \omega ^{N - 1} &{} \omega ^{2 (N - 1)} &{} \cdots &{} \omega ^{(N - 1)(N - 1)} \end{array} \right] . \end{aligned}$$

Let throughout the entire article be \(t \in {\mathbb {R}}\). For an operator \(A \in {\mathcal {L}}({\mathcal {H}})\), we define its operator exponential (or matrix exponential), cf. [8, eq. (2.1)] by

$$\begin{aligned} {\exp (A):= \sum _{k = 0}^\infty \frac{1}{k!}A^k \in {\mathcal {L}}({\mathcal {H}}).} \end{aligned}$$
(1)

Some natural choices are \(t = \pm 1\) and \(t = \pm \pi \). For a unitary operator \(U \in {\mathcal {L}}({\mathcal {H}})\), we denote by \({\text {Ham}}(U) \in {\mathcal {L}}({\mathcal {H}})\) a symmetric, linear, continuous operator such that

$$\begin{aligned} \exp (- \textrm{i}\hspace{0.55542pt}t {\text {Ham}}(U)) = U. \end{aligned}$$

This operator is in general not unique. The following calculus rules for the operator exponential are of relevance for us.

Lemma 1

(Calculus Rules for the Operator Exponential, cf. [8, Proposition 2.3] and [7, Lemma 4.169]) The following statements are valid:

  1. (i)

    Let a finite-dimensional, complex Hilbert space \({\mathcal {H}}\) and commuting matrices \(A, B \in {\mathcal {L}}({\mathcal {H}})\) be given. Then, we have

    $$\begin{aligned} \exp (A + B) = \exp (A)\exp (B). \end{aligned}$$

    In particular, the operators \(\exp (A)\) and \(\exp (B)\) commute.

  2. (ii)

    For all \(n \in {{\mathbb {N}}}\) and \(A \in {\mathcal {L}}({\mathcal {H}})\) holds

    $$\begin{aligned} \exp (n A) = \exp (A)^n. \end{aligned}$$
  3. (iii)

    For all \(A \in {\mathcal {L}}({\mathcal {H}})\) hold \(\exp (-A) = \exp (A)^{-1}\) and \(\exp (A^*) = \exp (A)^*\).

  4. (iv)

    For all \(A \in {\mathcal {L}}({\mathcal {H}})\) and all invertible \(T \in {\mathcal {L}}({\mathcal {H}})\) with inverse \(T^{-1} \in {\mathcal {L}}({\mathcal {H}})\), we have

    $$\begin{aligned} \exp \left( T^{-1} A T\right) = T^{-1} \exp (A) T. \end{aligned}$$
  5. (v)

    Let two finite-dimensional, complex Hilbert spaces \({\mathcal {H}}, {\mathcal {H}}'\) and linear operators \(A \in {\mathcal {L}}({\mathcal {H}})\), \(A' \in {\mathcal {L}}({\mathcal {H}}')\) be given. Then,

    $$\begin{aligned} \exp (A \otimes \textrm{id}_{{\mathcal {H}}'} + \textrm{id}_{{\mathcal {H}}} \otimes A') = \exp (A) \otimes \exp (A'). \end{aligned}$$

Additionally, we require some results from matrix theory throughout the text, which are introduced here. A matrix \(A \in {\mathcal {L}}({\mathcal {H}}_N)\) is called circulant, if there exists a sequence \((c_\ell )_{\ell = 0}^{N - 1} \subseteq {\mathbb {C}}\) such that for the entries holds \(A_{j,k} = c_{{(k - j \pmod {N})}}\) for \(j, k = 0, \dots , N - 1\). Hence, circulant matrices have the form

$$\begin{aligned} A = \left[ \begin{array}{ccccc} c_0 &{} c_1 &{} c_2 &{} \cdots &{} c_{N - 1}\\ c_{N - 1} &{} c_0 &{} c_1 &{} \cdots &{} c_{N - 2}\\ c_{N - 2} &{} c_{N - 1} &{} c_0 &{} \cdots &{} c_{N - 3}\\ \vdots &{} \vdots &{} \vdots &{} \ddots &{} \vdots \\ c_1 &{} c_2 &{} c_3 &{} \cdots &{} c_0 \\ \end{array} \right] . \end{aligned}$$

The shift matrix \({\text {Shift}}_N\) is the circulant matrix with respect to the sequence \((c_\ell )_{\ell = 0}^{N - 1}\) with \(c_1 = 1\) and \(c_\ell = 0\) for all other \(\ell \) reading as

$$\begin{aligned} {\text {Shift}}_N = \left[ \begin{array}{ccccc} 0 &{} 1 &{} 0 &{} \cdots &{} 0\\ 0 &{} 0 &{} 1 &{} \cdots &{} 0\\ \vdots &{} &{} &{} \ddots &{} 1\\ 1 &{} 0 &{} 0 &{} \cdots &{} 0 \end{array} \right] . \end{aligned}$$

According to [3, eq. (3.1.4)], every circulant matrix can be rewritten as

$$\begin{aligned} A = \sum _{\ell = 0}^{N - 1} c_\ell {\text {Shift}}_N^\ell . \end{aligned}$$

This class of matrices has the following properties regarding their eigenvalues and eigenvectors.

Theorem 2

(Diagonalization of Circulant Matrices, see [3, Theorem 3.2.2] as well as [5, Sect. 3.1]) Let \(A \in {\mathcal {L}}({\mathcal {H}}_N)\) be a circulant matrix with respect to the complex sequence \((c_k)_{k = 0}^{N - 1} \). Then, A is diagonalizable with

$$\begin{aligned} A = \textrm{QFT}_N^\dagger \cdot \Lambda \cdot \textrm{QFT}_N, \end{aligned}$$

where \(\textrm{QFT}_N\) represents again the quantum Fourier transform and \(\Lambda = {\text {diag}}(\lambda _0, \dots , \lambda _{N - 1})\) with

$$\begin{aligned} \lambda _m = \sum _{j = 0}^{N - 1} c_j \omega ^{jm} \text {~for all~} m = 0, \dots , N - 1. \end{aligned}$$

It should be emphasized that the original results in [3] and [5] are formulated with respect to the discrete Fourier transform. As we are only interested in its quantum counterpart, we rewrote the statement in our sense. Theorem 2 means that the vectors \(\left| {\textrm{QFT}_N m}\right\rangle = \frac{1}{\sqrt{N}} \sum _{j = 0}^{N - 1} \omega ^{jm} \left| {j}\right\rangle \) form a set of eigenvectors for all circulant matrices. The associated eigenvalues read as the quantum Fourier transform of the vector \((c_0, \dots , c_{N - 1}) \in {\mathbb {C}}^N\).

Interestingly, circulant matrices have been used previously in the context of quantum Fourier transform in [16]. Our work does, however, not make use of the results therein.

3 Exponential of projection-based tensor decompositions

In this section, we propose a formula for the operator exponential of projection-based tensor decompositions. The following theorem serves as our main result in this section.

Theorem 3

Let finite-dimensional, complex Hilbert spaces \({\mathcal {H}}\) and \({\mathcal {H}}'\) be given. Consider for \(N \in {\mathbb {N}}\) the operators \((P_j)_{j = 0}^{N - 1} \subseteq {\mathcal {L}}({\mathcal {H}})\) and \(({\text {Ham}}_j)_{j = 0}^{N - 1} \subseteq {\mathcal {L}}({\mathcal {H}}')\) that fulfill the following conditions:

  1. (i)

    The operators \((P_j)_{j = 0}^{N - 1}\) and \(({\text {Ham}}_j)_{j = 0}^{N - 1}\) are symmetric.

  2. (ii)

    For all \(j, k = 0, \dots , N - 1\), we have \(P_j P_k = \delta _{j,k} P_j\).

  3. (iii)

    The equation \(\sum _{j = 0}^{N - 1} P_j = \textrm{id}_{{\mathcal {H}}}\) is valid.

Then, the operators \((\exp (- \textrm{i}\hspace{0.55542pt}t P_j \otimes {\text {Ham}}_j))_{j = 0}^{N - 1}\) commute and we have

$$\begin{aligned} {\exp \left( - \textrm{i}\hspace{0.55542pt}t \sum _{j = 0}^{N - 1} P_j \otimes {\text {Ham}}_j \right) } = \prod _{j = 0}^{N - 1} \exp (- \textrm{i}\hspace{0.55542pt}t P_j \otimes {\text {Ham}}_j) = \sum _{j = 0}^{N - 1} P_j \otimes \exp (- \textrm{i}\hspace{0.55542pt}t {\text {Ham}}_j). \end{aligned}$$

Proof

First, we observe that the terms \((P_j \otimes {\text {Ham}}_j)_{j = 0}^{N - 1}\) commute since

$$\begin{aligned} (P_j \otimes {\text {Ham}}_j)(P_k \otimes {\text {Ham}}_k) = (P_j P_k) \otimes ({\text {Ham}}_j {\text {Ham}}_k) = 0 = (P_k \otimes {\text {Ham}}_k) \otimes (P_j \otimes {\text {Ham}}_j) \end{aligned}$$

for \(j \ne k\). On the one hand, Lemma 1 yields that \(\exp (- \textrm{i}\hspace{0.55542pt}t P_j \otimes {\text {Ham}}_j)\) commute and

$$\begin{aligned} \exp \left( - \textrm{i}\hspace{0.55542pt}t \sum _{j = 0}^{N - 1} P_j \otimes {\text {Ham}}_j\right) = \prod _{j = 0}^{N - 1} \exp (- \textrm{i}\hspace{0.55542pt}t P_j \otimes {\text {Ham}}_j). \end{aligned}$$

This shows the first part of the assertion.

On the other hand, we obtain inductively

$$\begin{aligned} \left( \sum _{j = 0}^{N - 1} P_j \otimes {\text {Ham}}_j\right) ^k = \sum _{j = 0}^{N - 1} P_j \otimes {\text {Ham}}_j^k \end{aligned}$$

for all integers \(k \ge 1\). Using (1), we get

$$\begin{aligned} \exp \left( - \textrm{i}\hspace{0.55542pt}t \sum _{{j = 0}}^{N - 1} P_j \otimes {\text {Ham}}_j\right)= & {} \textrm{id}_{{\mathcal {H}}\otimes {\mathcal {H}}'} + \sum _{k = 1}^\infty {\frac{(- \textrm{i}\hspace{0.55542pt}t)^k}{k!}} \left( \sum _{j = 0}^{N - 1} P_j \otimes {\text {Ham}}_j^k \right) \\= & {} \textrm{id}_{{\mathcal {H}}} \otimes \textrm{id}_{{\mathcal {H}}'} + \sum _{j = 0}^{N - 1} \sum _{k = 1}^\infty {\frac{(- \textrm{i}\hspace{0.55542pt}t)^k}{k!}} P_j \otimes {\text {Ham}}_j^k\\= & {} \textrm{id}_{{\mathcal {H}}} \otimes \textrm{id}_{{\mathcal {H}}'} + \sum _{j = 0}^{N - 1} P_j \otimes \left( \sum _{k = 1}^\infty \frac{(- \textrm{i}\hspace{0.55542pt}t)^k}{k!} {\text {Ham}}_j^k \right) \\= & {} \textrm{id}_{{\mathcal {H}}} \otimes \textrm{id}_{{\mathcal {H}}'} + \sum _{j = 0}^{N - 1} \left( P_j \otimes (\exp (- \textrm{i}\hspace{0.55542pt}t {\text {Ham}}_j) - \textrm{id}_{{\mathcal {H}}'}) \right) \\= & {} \textrm{id}_{{\mathcal {H}}} \otimes \textrm{id}_{{\mathcal {H}}'} - \sum _{j = 0}^{N - 1} P_j \otimes \textrm{id}_{{\mathcal {H}}'} + \sum _{j = 0}^{N - 1} P_j \otimes \exp (- \textrm{i}\hspace{0.55542pt}t {\text {Ham}}_j)\\= & {} \sum _{j = 0}^{N - 1} P_j \otimes \exp (- \textrm{i}\hspace{0.55542pt}t {\text {Ham}}_j). \end{aligned}$$

In the last step, we made use of (iii). This yields the remaining part of the assertion. \(\square \)

In this article, decompositions of the form \(\sum _{j = 0}^{N - 1} P_j \otimes {\text {Ham}}_j\), where \(P_j\), \({\text {Ham}}_j\) fulfill the conditions in Theorem 3 are called projection-based tensor decompositions. Clearly, the condition (ii) in Theorem 3 implies that the operators \((P_j)_{j = 0}^{N - 1}\) are projections. These decompositions can be interpreted in two ways: On the one hand, they are a generalization of a block diagonal matrix. To see this, take a basis \((\left| {j}\right\rangle )_{j = 0}^{\dim {\mathcal {H}}- 1}\) and set \(P_j = \left| {j}\right\rangle \left\langle {j}\right| \).

On the other hand, they are essentially a generalization of the diagonalization of symmetric matrices. To see this, let a symmetric operator \({\text {Ham}}\in {\mathcal {L}}({\mathcal {H}})\) be given for some N-dimensional, complex Hilbert space \({\mathcal {H}}\). Then, there exist eigenvalues \((\lambda _j)_{j = 0}^{N - 1}\) and corresponding eigenvectors \((\left| {v_j}\right\rangle )_{j = 0}^{N - 1}\) such that

$$\begin{aligned} {\text {Ham}}= \sum _{j = 0}^{N - 1} \lambda _j \left| {v_j}\right\rangle \left\langle {v_j}\right| . \end{aligned}$$

In this sense we can rewrite \({\mathcal {H}}\simeq {\mathbb {C}}\otimes {\mathcal {H}}\) and define \(P_j:= \left| {v_j}\right\rangle \left\langle {v_j}\right| \) and \({\text {Ham}}_j:= \lambda _j\) for \(j = 0, \dots , N - 1\). Then the conditions on the projections are verified and the symmetry of \({\text {Ham}}_j\) is identical to the eigenvalues to be real.

Occasionally, we make use of the following special case.

Corollary 4

Let finite-dimensional, complex Hilbert spaces \({\mathcal {H}}\) and \({\mathcal {H}}'\) be given. Take a symmetric operator \({\text {Ham}}\in {\mathcal {L}}({\mathcal {H}}')\) and a symmetric projection operator \(P \in {\mathcal {L}}({\mathcal {H}})\). For all \(t \in {\mathbb {R}}\) holds

$$\begin{aligned} \exp \left( - \textrm{i}\hspace{0.55542pt}t P \otimes {\text {Ham}}\right) = (\textrm{id}_{{\mathcal {H}}} - P) \otimes \textrm{id}_{{\mathcal {H}}'} + P \otimes \exp (- \textrm{i}\hspace{0.55542pt}t {\text {Ham}}). \end{aligned}$$

Proof

We apply Theorem 3 with \(N = 2\), \(P_0:= P\), \(P_1 = \textrm{id}_{{\mathcal {H}}} - P\) and \({\text {Ham}}_0:= {\text {Ham}}\), \({\text {Ham}}_1:= 0\). Clearly, \((P_j)_{j = 0, 1}\), \(({\text {Ham}}_j)_{j = 0, 1}\) are symmetric operators in their respective spaces. By definition holds \(P_0 + P_1 = \textrm{id}_{{\mathcal {H}}}\), and we have

$$\begin{aligned} P_0 P_1 = P (\textrm{id}_{{\mathcal {H}}} - P) = P - P^2 = 0 = P_1 P_0 \end{aligned}$$

as well as

$$\begin{aligned} P_1^2 = ({\textrm{id}_{{\mathcal {H}}}} - P)^2 = \textrm{id}_{{\mathcal {H}}} - 2P + P^2 = \textrm{id}_{{\mathcal {H}}} - P = P_1. \end{aligned}$$

Hence, Theorem 3 yields

$$\begin{aligned} \exp (- \textrm{i}\hspace{0.55542pt}t P \otimes {\text {Ham}})&= \exp \left( - \textrm{i}\hspace{0.55542pt}t \sum _{j = 0}^1 P_j \otimes {\text {Ham}}_j\right) = \sum _{j = 0}^1 P_j \otimes \exp (-\textrm{i}\hspace{0.55542pt}t {\text {Ham}}_j)\\&= (\textrm{id}_{{\mathcal {H}}} - P) \otimes \textrm{id}_{{\mathcal {H}}'} + P \otimes \exp (- \textrm{i}\hspace{0.55542pt}t {\text {Ham}}). \end{aligned}$$

This ends the proof. \(\square \)

The previous results are illustrated with the following example.

Example 5

(Controlled NOT gate) Consider the controlled \({\text {NOT}}\) gate

$$\begin{aligned} {\text {CNOT}}= \left[ \begin{array}{cccc} 1 &{} 0 &{} 0 &{} 0\\ 0 &{} 1 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 1\\ 0 &{} 0 &{} 1 &{} 0 \end{array}\right] . \end{aligned}$$

Its behavior can be described as follows: If the first qubit takes the value \(\left| {1}\right\rangle \), then the second qubit is flipped, which is the application of the \({\text {NOT}}\) gate. Otherwise, no change is performed on the second qubit. In other words, it has the following output.

$$\begin{aligned} {\text {CNOT}}\left| {0}\right\rangle \left| {x}\right\rangle = \left| {0}\right\rangle \left| {x}\right\rangle \text {~and~} {\text {CNOT}}\left| {1}\right\rangle \left| {x}\right\rangle = \left| {1}\right\rangle \left| {1-x}\right\rangle = \left| {1}\right\rangle \left| {{\text {NOT}}x}\right\rangle \text {~for all~} x \in \{0,1\}. \end{aligned}$$

It is straightforward to see

$$\begin{aligned} {\text {CNOT}}= \left| {0}\right\rangle \left\langle {0}\right| \otimes \textrm{id}_2 + \left| {1}\right\rangle \left\langle {1}\right| \otimes {\text {NOT}}. \end{aligned}$$
(2)

We write the \({\text {NOT}}\) gate as the exponential of a Hamiltonian. For this sake, we take \(\left| {\pm }\right\rangle = \frac{1}{\sqrt{2}}(\left| {0}\right\rangle \pm \left| {1}\right\rangle )\). It is straightforward to verify

$$\begin{aligned} {\text {NOT}}= \left| {+}\right\rangle \left\langle {+}\right| - \left| {-}\right\rangle \left\langle {-}\right| . \end{aligned}$$

Corollary 4 yields \({\text {NOT}}= \exp (-\textrm{i}\hspace{0.55542pt}t {\text {Ham}}({\text {NOT}}))\) with \(t = \pi \) and \({\text {Ham}}({\text {NOT}}) = \left| {-}\right\rangle \left\langle {-}\right| \). Hence, we rewrite the controlled \({\text {NOT}}\) gate as

$$\begin{aligned} {\text {CNOT}}= & {} ({\textrm{id}_2} - \left| {1}\right\rangle \left\langle {1}\right| ) \otimes \textrm{id}_2 + \left| {1}\right\rangle \left\langle {1}\right| \otimes \exp (-\textrm{i}\hspace{0.55542pt}t {\text {Ham}}({\text {NOT}}))\\ {}= & {} \exp (-\textrm{i}\hspace{0.55542pt}t \left| {1}\right\rangle \left\langle {1}\right| \otimes \left| {-}\right\rangle \left\langle {-}\right| ). \end{aligned}$$

In the upcoming result, we generalize Theorem 3 to incorporate transformations within the Hamiltonians.

Theorem 6

Let finite-dimensional, complex Hilbert spaces \({\mathcal {H}}\) and \({\mathcal {H}}'\) be given. Consider for \(N \in {\mathbb {N}}\) the operators \((P_j)_{j = 0}^{N - 1}, S \subseteq {\mathcal {L}}({\mathcal {H}})\) and \(({\text {Ham}}_j)_{j = 0}^{N - 1}, (T_j)_{j = 0}^{N - 1} \subseteq {\mathcal {L}}({\mathcal {H}}')\) that fulfill the following conditions:

  1. (i)

    The operators \((P_j)_{j = 0}^{N - 1}\) and \(({\text {Ham}}_j)_{j = 0}^{N - 1}\) are symmetric.

  2. (ii)

    For all \(j, k = 0, \dots , N - 1\), we have \(P_j P_k = \delta _{j,k}P_j\).

  3. (iii)

    The equation \(\sum _{j = 0}^{N - 1} P_j = \textrm{id}_{{\mathcal {H}}}\) is valid.

  4. (iv)

    The operators \((T_j)_{j = 0}^{N - 1}\) and S are unitary. Moreover, for all \(j = 0, \dots , {N - 1}\) holds \(T_j = \exp (-\textrm{i}\hspace{0.55542pt}t {\text {Ham}}(T_j))\).

Then, we have

$$\begin{aligned} \exp \left( -\textrm{i}\hspace{0.55542pt}t \sum _{j = 0}^{N - 1} \left( S^\dagger P_j S\right) \otimes \left( T_j^\dagger \cdot {\text {Ham}}_j \cdot T_j\right) \right) = (S \otimes \textrm{id}_{{\mathcal {H}}'})^\dagger T^\dagger U T (S \otimes \textrm{id}_{{\mathcal {H}}'}) \end{aligned}$$

with

$$\begin{aligned} T:= \exp \left( -\textrm{i}\hspace{0.55542pt}t \sum _{j = 0}^{N - 1} P_j \otimes {\text {Ham}}(T_j)\right) \text {~and~} U:= \exp \left( -\textrm{i}\hspace{0.55542pt}t \sum _{j = 0}^{N - 1} P_j \otimes {\text {Ham}}_j\right) . \end{aligned}$$

Proof

As the operators \((S^\dagger P_j S)_{j = 0}^{N - 1}\) and \((T_j^\dagger {\text {Ham}}_j T_j)_{j = 0}^{N - 1}\) fulfill the criteria in Theorem 3, we obtain

$$\begin{aligned} \exp \left( - \textrm{i}\hspace{0.55542pt}t \sum _{j = 0}^{N - 1} (S^\dagger P_j S)\! \right.&\left. \otimes \, T_j^\dagger {\text {Ham}}_j T_j \right) = \sum _{j = 0}^{N - 1} (S^\dagger P_j S) \otimes \exp (-\textrm{i}\hspace{0.55542pt}t T_j^\dagger {\text {Ham}}_j T_j) \nonumber \\&= (S \otimes \textrm{id}_{{\mathcal {H}}'})^\dagger \left( \sum _{j = 0}^{N - 1} P_j \otimes \exp (-\textrm{i}\hspace{0.55542pt}t T_j^\dagger {\text {Ham}}_j T_j)\right) (S \otimes \textrm{id}_{{\mathcal {H}}'}). \end{aligned}$$
(3)

By Lemma 1, we get

$$\begin{aligned} \exp (-\textrm{i}\hspace{0.55542pt}t T_j^\dagger {\text {Ham}}_j T_j) = T_j^\dagger \exp (-\textrm{i}\hspace{0.55542pt}t {\text {Ham}}_j) T_j. \end{aligned}$$

For operators \((U_j)_{j = 0}^{N - 1},(V_j)_{j = 0}^{N - 1} \subseteq {\mathcal {L}}({\mathcal {H}})\), it is straightforward to show

$$\begin{aligned} \sum _{j = 0}^{N - 1} P_j \otimes V_j U_j = \left( \sum _{j = 0}^{N - 1} P_j \otimes V_j\right) \left( \sum _{j = 0}^{N - 1} P_j \otimes U_j\right) . \end{aligned}$$

The application of this result on the middle factor in (3) yields

$$\begin{aligned}{} & {} \sum _{j = 0}^{N -1} P_j \otimes \exp (-\textrm{i}\hspace{0.55542pt}t T_j^\dagger {\text {Ham}}_j T_j) = \sum _{j = 0}^{N - 1} P_j \otimes T_j^\dagger \exp (-\textrm{i}\hspace{0.55542pt}t {\text {Ham}}_j) T_j\\{} & {} \quad = \left( \sum _{j = 0}^{N - 1} P_j \otimes T_j^\dagger \right) \left( \sum _{j = 0}^{N - 1} P_j \otimes \exp (-\textrm{i}\hspace{0.55542pt}t {\text {Ham}}_j) T_j \right) \\{} & {} \quad = \left( \sum _{j = 0}^{N - 1} P_j \otimes T_j \right) ^\dagger \left( \sum _{j = 0}^{N - 1} P_j \otimes \exp (-\textrm{i}\hspace{0.55542pt}t {\text {Ham}}_j) \right) \left( \sum _{j = 0}^{N - 1} P_j \otimes T_j \right) . \end{aligned}$$

In combination with \(T_j = \exp (-\textrm{i}\hspace{0.55542pt}t {\text {Ham}}(T_j))\), the application of Theorem 3 on each factor yields the assertion. \(\square \)

The precise purpose of Theorem 6 will become clear later. Nevertheless, we want to provide an application of it and return for this sake to Example 5.

Example 7

(Alternative representation of \({\text {CNOT}}\)) As demonstrated in Example 5, we have \({\text {Ham}}({\text {CNOT}}) = \left| {1}\right\rangle \left\langle {1}\right| \otimes \left| {-}\right\rangle \left\langle {-}\right| \). We apply Theorem 6. With \(\left| {-}\right\rangle = H\left| {1}\right\rangle \), where H is the Hadamard gate (cf. [12, eq. (1.14)]), we obtain for instance with \(S = \textrm{id}_2\) and \(T_j = H\) for \(j = 0, 1\) that

$$\begin{aligned} \left| {1}\right\rangle \left\langle {1}\right| \otimes \left| {-}\right\rangle \left\langle {-}\right| = \left| {1}\right\rangle \left\langle {1}\right| \otimes (H\left| {1}\right\rangle \left\langle {1}\right| H^\dagger ). \end{aligned}$$

Then, we set \(t = \pi \) and \(\exp (-\textrm{i}\hspace{0.55542pt}t \left| {1}\right\rangle \left\langle {1}\right| ) = Z\). Interchanging the roles of the qubits yields

$$\begin{aligned} \exp (-\textrm{i}\hspace{0.55542pt}t \left| {1}\right\rangle \left\langle {1}\right| \otimes (H\left| {1}\right\rangle \left\langle {1}\right| H))= & {} (\textrm{id}_2 \otimes H) \exp (-\textrm{i}\hspace{0.55542pt}t \left| {1}\right\rangle \left\langle {1}\right| \otimes \left| {1}\right\rangle \left\langle {1}\right| ) (\textrm{id}_2 \otimes H)\\= & {} (\textrm{id}_2 \otimes H)(\left| {0}\right\rangle \left\langle {0}\right| \otimes \textrm{id}_2 + \left| {1}\right\rangle \left\langle {1}\right| \otimes Z)(\textrm{id}_2 \otimes H)\\= & {} (\textrm{id}_2 \otimes H){\text {CZ}}(\textrm{id}_2 \otimes H), \end{aligned}$$

where CZ is the controlled Z gate.

Alternatively, one could choose \(S = H\) and \(T_j = H\) for \(j = 0, 1\). This yields

$$\begin{aligned} {\text {CNOT}}= & {} \exp \left( -\textrm{i}\hspace{0.55542pt}t (H\left| {-}\right\rangle \left\langle {-}\right| H) \otimes (H \left| {1}\right\rangle \left\langle {1}\right| H)\right) \\= & {} (H \otimes \textrm{id}_2) (\textrm{id}_2 \otimes H) \exp (-\textrm{i}\hspace{0.55542pt}t \left| {-}\right\rangle \left\langle {-}\right| \otimes \left| {1}\right\rangle \left\langle {1}\right| ) (\textrm{id}_2 \otimes H) (H \otimes \textrm{id}_2)\\= & {} (H \otimes H) \exp (-\textrm{i}\hspace{0.55542pt}t \left| {-}\right\rangle \left\langle {-}\right| \otimes \left| {1}\right\rangle \left\langle {1}\right| ) (H \otimes H). \end{aligned}$$

In the last term, the factor in the middle is a \({\text {CNOT}}\) gate with the roles of control and data reversed. These results are well known in the quantum computing literature (cf. [12, Exercises 4.17, 4.20]) and are subsumed in Fig. 1.

Fig. 1
figure 1

Alternative representations of the \({\text {CNOT}}\) gate

4 Alternative quantum phase estimation

After these preparations, we now come to the main subject of our investigation—the quantum phase estimation. Let an operator \(U \in {\mathcal {L}}({\mathcal {H}})\) acting on u qubits together with an eigenvector \(\left| {\psi }\right\rangle \) and corresponding eigenvalue \(\exp ( \textrm{i}\hspace{0.55542pt}2\pi {\varphi })\), \({\varphi } \in [0,1)\) be given. The goal is to find (an approximation) of the phase \(\varphi \).

This can be done using quantum phase estimation. For this sake, an ancilla register with n qubits is considered. Here, as a reminder, we write \(N = 2^n\). Then, the circuit in Fig. 2 is applied.

Fig. 2
figure 2

Circuit of the quantum phase estimation

The operator \(cU \in {\mathcal {L}}({\mathcal {H}}_N \otimes {\mathcal {H}})\) is called the controlled U gate and is defined by

$$\begin{aligned} cU\left| {j}\right\rangle \left| {x}\right\rangle := \left| {j}\right\rangle \left| {U^j x}\right\rangle {\text {~for all~} j = 0, \dots , N - 1}. \end{aligned}$$
(4)

Let the ancilla register be initialized with \(\left| {0}\right\rangle \) and assume \(N \varphi \) to be an integer. Then, the result after applying the quantum phase estimation in Fig. 2 is \(\left| {N\varphi }\right\rangle \left| {\psi }\right\rangle \). The measurement of the ancilla register then yields the phase as classical information. In practice, however, \(N\varphi \) is not an integer and hence one obtains a superposition and a probabilistic measurement as discussed, e.g., in [12, Sect. 5.2]. For the sake of exposition, we assume in the rest of this article \(N \varphi \) to be an integer for our choice of n. Additionally, in this article, we do not consider potential physical limitations related to the number of qubits used in the ancilla register, as discussed in [2]. Instead, our focus lies solely on the mathematical derivations.

Next, we change the quantum phase estimation depicted in Fig. 2 by substituting the application of the Hadamard transforms on every qubit to a quantum Fourier transform. This yields the circuit depicted in Fig. 3 (left), which we will refer to as alternative quantum phase estimation.

Occasionally, we may abbreviate this operation by the multi-qubit gate, in Fig. 3 (right), where we note which input register is devoted to the ancilla register (phase) and which one to the eigenvector (vector). This is a slight abuse of notation, as it refers to our alternative version. Moreover, we only assume that this gate realizes the operator. No assumption on its inner working is made, though.

Fig. 3
figure 3

Left: Circuit for the alternative quantum phase estimation. Right: Short-hand representation

Of course, for \(\left| {\textrm{anc}}\right\rangle = \left| {0}\right\rangle \) it is straightforward to verify \(H^{\otimes n}\left| {0}\right\rangle = \textrm{QFT}_N\left| {0}\right\rangle \). In this case, both circuits provide the same result. Hence, our modification is in this sense equivalent to the traditional one. However, the application of the quantum Fourier transform is computationally more expensive than the Hadamard transform, and hence, no performance gain can be claimed.

Nevertheless, we want to analyze the action of the circuit in Fig. 3 and derive a representation of a corresponding Hamiltonian using the results in Sect. 3 in the upcoming subsection.

4.1 Action of the alternative quantum phase estimation

Given an eigenvector \(\left| {\psi }\right\rangle \) of U with corresponding eigenvalue \(e^{\textrm{i}\hspace{0.55542pt}2\pi \varphi }\) and an ancilla qubit \(\left| {\textrm{anc}}\right\rangle \) initialized in \(\left| {j}\right\rangle \), \(j \in \{0, \dots , N - 1\}\). We consider the actions of the circuit in Fig. 3 after each of the steps marked therein. For this sake, let \(\omega := e^{\textrm{i}\hspace{0.55542pt}\frac{2\pi }{N}}\) and let \(\left| {\textrm{Step}\ k}\right\rangle \) be the quantum state after the application of Step k.

Step 1. The application of the quantum Fourier transform on the ancilla qubit yields

$$\begin{aligned} \left| {\textrm{Step}\ 1}\right\rangle = (\textrm{QFT}_N \otimes \textrm{id}_{\mathcal {H}})\left| {j}\right\rangle \left| {\psi }\right\rangle = \left| {\textrm{QFT}_N j}\right\rangle \left| {\psi }\right\rangle {=} \frac{1}{\sqrt{N}} \sum _{k = 0}^{N - 1} \omega ^{j k} \left| {k}\right\rangle \left| {\psi }\right\rangle . \end{aligned}$$

Step 2. Next, the controlled U gate is applied, which gives

$$\begin{aligned} \left| {\textrm{Step}\ 2}\right\rangle&= cU \left| {\textrm{Step}\ 1}\right\rangle = \frac{1}{\sqrt{N}} \sum _{k = 0}^{N - 1} \omega ^{jk} cU(\left| {k}\right\rangle \left| {\psi }\right\rangle ) = \frac{1}{\sqrt{N}} \sum _{k = 0}^{N - 1} \omega ^{jk} \left| {k}\right\rangle \left| {U^k \psi }\right\rangle \\&= \frac{1}{\sqrt{N}} \sum _{k = 0}^{N - 1} \omega ^{jk} e^{\textrm{i}\hspace{0.55542pt}k 2 \pi \varphi } \left| {k}\right\rangle \left| {\psi }\right\rangle . \end{aligned}$$

Step 3. The application of the inverse quantum Fourier transform to the ancilla register yields

$$\begin{aligned} \left| {\textrm{Step}\ 3}\right\rangle= & {} (\textrm{QFT}_N^\dagger \otimes \textrm{id}_{\mathcal {H}}) \left| {\textrm{Step} 2}\right\rangle = \frac{1}{\sqrt{N}}\sum _{k = 0}^{N - 1} \omega ^{j k} e^{\textrm{i}\hspace{0.55542pt}k 2 \pi \varphi } \textrm{QFT}_N^\dagger \left| {k}\right\rangle \left| {\psi }\right\rangle \\= & {} \frac{1}{N} \sum _{k = 0}^{N - 1} \sum _{m = 0}^{N - 1} \omega ^{jk} \omega ^{-km} e^{\textrm{i}\hspace{0.55542pt}k 2\pi \varphi } \left| {m}\right\rangle \left| {\psi }\right\rangle \\ {}= & {} \frac{1}{N} \sum _{m = 0}^{N - 1} \left( \sum _{k = 0}^{N - 1} (\omega ^j \omega ^{-m} e^{\textrm{i}\hspace{0.55542pt}2\pi \varphi })^k \right) \left| {m}\right\rangle \left| {\psi }\right\rangle . \end{aligned}$$

With \(\omega = e^{\textrm{i}\hspace{0.55542pt}\frac{2 \pi }{N}}\) we get \(\omega ^j \omega ^{-m} e^{\textrm{i}\hspace{0.55542pt}2\pi \varphi } = e^{\textrm{i}\hspace{0.55542pt}\frac{2\pi }{N}(j - m + N\varphi )}\). Hence, we obtain using Theorem A.1(i) in the appendix that

$$\begin{aligned} \sum _{k = 0}^{N - 1} (\omega ^j \omega ^{-m} e^{\textrm{i}\hspace{0.55542pt}2\pi \varphi })^k = \left\{ \begin{array}{cl}N, &{}\text {if~} m \equiv j + N \varphi {\hspace{-1ex}\pmod {N}} \\ 0, &{}\text {else.}\end{array}\right. \end{aligned}$$

This yields eventually

$$\begin{aligned} \left| {\textrm{Step} 3}\right\rangle = \left| {j + N \varphi {\hspace{-1ex}\pmod {N}}}\right\rangle \left| {\psi }\right\rangle . \end{aligned}$$

Thus, the alternative QPE with input \(\left| {j}\right\rangle \left| {\psi }\right\rangle \) yields in the ancilla register the value of \(N \varphi \) shifted by j in the rest class ring.

4.2 Hamiltonian of the alternative quantum phase estimate

As a next step, we want to use the results in Sect. 3 to represent our alternative QPE by a Hamiltonian operator. First, we rewrite the controlled U gate using Theorem 3. By its definition in (4), it is straightforward to verify

$$\begin{aligned} cU = \sum _{j = 0}^{N - 1} \left| {j}\right\rangle \left\langle {j}\right| \otimes U^j. \end{aligned}$$

Let for the remainder of the work \({\text {Ham}}(U)\) be a Hamiltonian of U with \(U = \exp (-\textrm{i}\hspace{0.55542pt}t {\text {Ham}}(U))\). Then, we have

$$\begin{aligned} U^j = \exp (-\textrm{i}\hspace{0.55542pt}t {\text {Ham}}(U))^j = \exp (- \textrm{i}\hspace{0.55542pt}t j {\text {Ham}}(U)) \end{aligned}$$

by Lemma 1. This yields with \(P_j = \left| {j}\right\rangle \left\langle {j}\right| \) and \({\text {Ham}}_j = j {\text {Ham}}(U)\) in Theorem 3 that

$$\begin{aligned} cU= & {} \sum _{j = 0}^{N - 1} P_j \otimes \exp (- \textrm{i}\hspace{0.55542pt}t j {\text {Ham}}(U)) = \exp \left( - \textrm{i}\hspace{0.55542pt}t \sum _{j = 0}^{N - 1} P_j \otimes (j {\text {Ham}}(U)) \right) \\= & {} \exp \left( -\textrm{i}\hspace{0.55542pt}t \left( \sum _{j = 0}^{N - 1} j \left| {j}\right\rangle \left\langle {j}\right| \right) \otimes {\text {Ham}}(U) \right) . \end{aligned}$$

In other words, if we are given the Hamiltonian of an operator U, we can generate the Hamiltonian of the associated controlled U gate by forming the tensor product with the multiplier

$$\begin{aligned} C_N:= \sum _{j = 0}^{N - 1} j \left| {j}\right\rangle \left\langle {j}\right| = {\text {diag}}(0, 1, \dots , N - 1). \end{aligned}$$

Hence, we may as well write \({\text {Ham}}(cU) = C_N \otimes {\text {Ham}}(U)\). Occasionally, we refer to \(C_N\) as control multiplier.

Next, we write the operator encoded in the circuit in Fig. 3 as the matrix exponential of a Hamiltonian. Let \(\textrm{QPE}_N(U)\) denote the operator depicted therein. Then we get by its definition

$$\begin{aligned} \textrm{QPE}_N(U):= (\textrm{QFT}_N^\dagger \otimes \textrm{id}_{\mathcal {H}}) \cdot cU \cdot (\textrm{QFT}_N \otimes \textrm{id}_{\mathcal {H}}). \end{aligned}$$
(5)

Using Theorem 6, we get

$$\begin{aligned}{} & {} \textrm{QPE}_N(U) = (\textrm{QFT}_N^\dagger \otimes {\textrm{id}_{\mathcal {H}}}) \cdot \exp (-\textrm{i}\hspace{0.55542pt}t C_N \otimes {\text {Ham}}_j) \cdot \\{} & {} (\textrm{QFT}_N \otimes {\textrm{id}_{\mathcal {H}}}) = \exp (-\textrm{i}\hspace{0.55542pt}t Q_N \otimes {\textrm{id}_{\mathcal {H}}}) \end{aligned}$$

with

$$\begin{aligned} Q_N = \textrm{QFT}_N^\dagger C_N \textrm{QFT}_N. \end{aligned}$$

In other words, we get \({\text {Ham}}(\textrm{QPE}_N(U)) = Q_N \otimes {\text {Ham}}(U)\). Analogously, we might call \(Q_N\) the QPE multiplier. That means that the application of the alternative QPE can be represented as the tensor product of the QPE multiplier with the Hamiltonian of the target operator.

Remark 8

It is straightforward to see from the circuit in Fig. 3 and its formula representation in (5) that \(\textrm{QPE}_N(U)^\dagger = \textrm{QPE}_N(U^\dagger )\). Hence, the inversion of the alternative QPE is the same as the QPE of the inverse target operator. Also, it is straightforward to show for two commuting, unitary operators \(U_0, U_1 \in {\mathcal {L}}({\mathcal {H}})\) that

$$\begin{aligned} \textrm{QPE}_N(U_0 U_1) = \textrm{QPE}_N(U_0) \textrm{QPE}_N(U_1) = \textrm{QPE}_N(U_1) \textrm{QPE}_N(U_0). \end{aligned}$$

These observations do not need to be true for the textbook QPE.

In the remainder of this section, we would like to derive an explicit matrix representation of this operator. This is addressed in the following subsection.

4.3 Properties of the QPE multiplier

By the definition of the control multiplier, we obtain

$$\begin{aligned} Q_N = {\textrm{QFT}_N^\dagger } C_N \textrm{QFT}_N = \sum _{j = 0}^{N - 1} j \left| {\textrm{QFT}_N^\dagger j}\right\rangle \left\langle {\textrm{QFT}_N^\dagger j}\right| . \end{aligned}$$

By the definition of the quantum Fourier transform, we obtain

$$\begin{aligned} \left| {\textrm{QFT}_N^\dagger j}\right\rangle = \frac{1}{\sqrt{N}}\sum _{k = 0}^{N - 1} \omega ^{-jk} \left| {k}\right\rangle . \end{aligned}$$

This yields

$$\begin{aligned} Q_N = \frac{1}{N}\sum _{j, k, \ell = 0}^{N - 1} j \omega ^{-jk}\omega ^{j\ell } \left| {k}\right\rangle \left\langle {\ell }\right| = \frac{1}{N} \sum _{k, \ell = 0}^{N - 1} \left( \sum _{j = 0}^{N - 1} j \omega ^{(\ell - k)j} \right) \left| {k}\right\rangle \left\langle {\ell }\right| . \end{aligned}$$

Using Theorem A.1(ii) in the appendix, we get

$$\begin{aligned} \sum _{j = 0}^{N - 1} j (\omega ^{\ell - k})^j = \left\{ \begin{array}{cl} \dfrac{N (N - 1)}{2} &{}\text {if~} \ell = k, \\ &{} \\ \dfrac{N}{\omega ^{\ell - k} - 1} &{}\text {else}.\end{array} \right. \end{aligned}$$

Then, we obtain

$$\begin{aligned} Q_N= & {} \frac{N - 1}{2} {\textrm{id}_N} + \sum _{\begin{array}{c} k, \ell = 0, k \ne \ell \end{array}}^{N - 1} \frac{1}{\omega ^{\ell - k} - 1} \left| {k}\right\rangle \left\langle {\ell }\right| \nonumber \\= & {} \frac{N - 1}{2} {\textrm{id}_N} + \sum _{k = 0}^{N - 1}\sum _{j = 1}^{N - 1}\frac{1}{\omega ^j - 1} \left| {k}\right\rangle \left\langle {k + j {\hspace{-1ex}\pmod {N}}}\right| \nonumber \\= & {} \frac{N - 1}{2} {\textrm{id}_N} + \sum _{j = 1}^N \frac{1}{\omega ^j - 1} {\text {Shift}}_N^j. \end{aligned}$$
(6)

Hence, the QPE multiplier is in fact the circulant matrix with respect to \(c_0 = \frac{N -1}{2}\) and \(c_j = \frac{1}{\omega ^j - 1}\) that has the eigenvalues \(0, 1, \dots , N - 1.\)

5 Recursive quantum phase estimate

Next, we derive a recursive decomposition of the QPE multiplier. For this sake, we decompose the n-qubit ancilla register into two subregisters each having \(n_0\), respectively, \(n_1\) qubits with \(n = n_0 + n_1\). Analogously, set \(N_j = 2^{n_j}\) for \(j = 0, 1\) with \(N = N_0 \cdot N_1\). We start by proposing the following lemma.

Lemma 9

Let a circulant matrix \(A \in {\mathcal {L}}({\mathcal {H}}_N)\) be given with entries

$$\begin{aligned} a_{j,k} = c_{k - j} \text {~for all~} j, k = 0, \dots , N_0 N_1 - 1 \end{aligned}$$

for a sequence \((c_\ell )_{\ell = 0}^{N_0 N_1 - 1} \subseteq {\mathbb {C}}\). Let \(\left| {v_m}\right\rangle = \left| {\textrm{QFT}_{N_0}^\dagger m}\right\rangle \). Then, the following equation holds

$$\begin{aligned} A = \sum _{m = 0}^{N_0 - 1} \left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes \left( \sum _{\ell = 0}^{N_0 - 1} \omega ^{- \ell m N_1 } A^{(\ell )} \right) , \end{aligned}$$

where \(A^{(\ell )} \in {\mathcal {L}}({\mathcal {H}}_{N_1})\) with \(A^{(\ell )}_{j,k} = c_{{(k - j + N_1 \ell \pmod {N})}}\) for \(j, k = 0, \dots , N_1 - 1\) and \(\ell = 0, \dots , N_0 - 1\) and \(\omega = \exp (\textrm{i}\hspace{0.55542pt}\frac{2 \pi }{N})\).

Proof

Let \(A^{(\ell )}\) be defined as above. It is straightforward to verify that the following identity is valid

$$\begin{aligned} A = \left[ \begin{array}{ccccc} A^{(0)} &{} A^{(1)} &{} A^{(2)} &{} \cdots &{} A^{(N_0 - 1)}\\ A^{(N_0 - 1)} &{} A^{(0)} &{} A^{(1)} &{} \cdots &{} A^{(N_0 - 2)}\\ A^{(N_0 - 2)} &{} A^{(N_0 - 1)} &{} A^{(0)} &{} \cdots &{} A^{(N_0 - 3)}\\ \vdots &{} \vdots &{} \vdots &{} \ddots &{} \vdots \\ A^{(1)} &{} A^{(2)} &{} A^{(3)} &{} \cdots &{} A^{(0)} \\ \end{array} \right] . \end{aligned}$$

In other words, A is the Kronecker product of the matrices \(A^{(\ell )}\) with powers of the \({\text {Shift}}\) matrix. Hence, we write

$$\begin{aligned} A = \sum _{\ell = 0}^{N_0 - 1} {\text {Shift}}_{N_0}^\ell \otimes A^{(\ell )}. \end{aligned}$$

Next, we use the diagonalization of the \({\text {Shift}}_{N_0}\). With \(\omega = \exp (\textrm{i}\hspace{0.55542pt}\frac{2 \pi }{N})\), we get \(\exp (\textrm{i}\hspace{0.55542pt}\frac{2\pi }{N_0}) = \omega ^{N_1}\) and set

$$\begin{aligned} \left| {v_m}\right\rangle := \left| {\textrm{QFT}_{N_0}^\dagger m}\right\rangle = \frac{1}{\sqrt{N_0}} \sum _{j = 0}^{N_0 - 1} \omega ^{- N_1 j m} \left| {j}\right\rangle \end{aligned}$$

to obtain

$$\begin{aligned} {\text {Shift}}_{N_0} = \sum _{m = 0}^{N_0 - 1} \omega ^{-m N_1} \left| {v_m}\right\rangle \left\langle {v_m}\right| . \end{aligned}$$

Then, we further decompose

$$\begin{aligned} A = \sum _{\ell = 0}^{N_0 - 1} \left( \sum _{m = 0}^{N_0 - 1} \omega ^{-\ell m N_1} \left| {v_m}\right\rangle \left\langle {v_m}\right| \right) \otimes A^{(\ell )} = \sum _{m = 0}^{N_0 - 1} \left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes \left( \sum _{\ell = 0}^{N_0 - 1} \omega ^{-\ell m N_1} A^{\ell } \right) . \end{aligned}$$

This yields the assertion. \(\square \)

Hence, every circulant matrix can be rewritten as a projection-based tensor decomposition using rank-1 projections. It is worth mentioning that the matrices \(A^{(\ell )}\) in Lemma 9 do not need to be circulant themselves in general. The factors are associated with the inverse quantum Fourier transform of the corresponding entries of \(A^{(\ell )}\). For instance, we obtain for \(N_0 = 2\) the decomposition

$$\begin{aligned} A = \left| {+}\right\rangle \left\langle {+}\right| \otimes (A^{(0)} + A^{(1)}) + \left| {-}\right\rangle \left\langle {-}\right| \otimes (A^{(0)} - A^{(1)}), \end{aligned}$$

where again \(\left| {+}\right\rangle = H\left| {0}\right\rangle \) and \(\left| {-}\right\rangle = H\left| {1}\right\rangle \).

Next, Lemma 9 is applied to the QPE multiplier in the upcoming theorem.

Theorem 10

Let \(Q_N\) be the QPE multiplier with respect to \(n = n_0 + n_1\) qubits and \(N_j = 2^{n_j}\), \(j = 0, 1\) with \(N = N_0 \cdot N_1\). Then, we obtain the decomposition

$$\begin{aligned} Q_N = N_0 \sum _{m = 0}^{N_0 - 1} \left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes (D_{\omega ,N_1}^{\dagger })^m Q_{N_1} D_{\omega ,N_1}^m + Q_{N_0} \otimes \textrm{id}_{N_1} \end{aligned}$$

with \(D_{\omega ,N_1}:= \textrm{diag}(1, \omega , \dots , \omega ^{N_1 - 1}) = \sum _{j = 0}^{N_1 - 1} \omega ^j \left| {j}\right\rangle \left\langle {j}\right| \) and \(\omega = \exp (\textrm{i}\hspace{0.55542pt}\frac{2 \pi }{N})\).

Proof

As we have shown in (6), the QPE multiplier is a circulant matrix with respect to the sequence

$$\begin{aligned} c_0 = \frac{N - 1}{2} \text {~and~} c_k = \frac{1}{\omega ^k - 1} \text {~for~} k = 1, \dots , N - 1. \end{aligned}$$

Hence, Lemma 9 guarantees the decomposition

$$\begin{aligned} Q_N = \sum _{m = 0}^{N_0 - 1} \left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes \left( \sum _{\ell = 0}^{N_0 - 1} \omega ^{-N_1 \ell m} A^{(\ell )}\right) \end{aligned}$$

with \(A^{(\ell )}_{j,k} = c_{{(k - j + N_1 \ell \pmod {N})}}\). Next, we calculate the entries of the prefactors in the above decomposition. Let \(j, k \in \{0, \dots , N - 1\}\). We distinguish two cases.

Case \(j \ne k\).

$$\begin{aligned} \sum _{\ell = 0}^{N_0 - 1} \omega ^{-N_1 \ell m} A^{(\ell )}_{j,k} = \sum _{\ell = 0}^{N_0 - 1} \frac{\omega ^{-N_1 \ell m}}{\omega ^{k - j + N_1\ell } - 1}. \end{aligned}$$
(7)

For \(z \in {\mathbb {C}}\), \(|z| = 1\) with \(z, z^{N_0} \ne 1\) we have by the formula for the geometric series the identity

$$\begin{aligned} \frac{z^{N_0} - 1}{z - 1} = \sum _{t = 0}^{N_0 - 1} z^t \text {~or equivalently~} \frac{1}{z - 1} = \frac{1}{z^{N_0} - 1} \sum _{t = 0}^{N_0 - 1} z^t. \end{aligned}$$

Hence, we obtain with \(N_0 N_1 = N\), \(\omega ^N = 1\) that

$$\begin{aligned} (7)&= \sum _{\ell = 0}^{N_0 - 1} \frac{\omega ^{-N_1 \ell m}}{\omega ^{N_0(k - j)}\omega ^{N_0 N_1 \ell } - 1} \sum _{t = 0}^{N_0 - 1} \omega ^{(k - j) t} \omega ^{N_1 \ell t} \nonumber \\&= \frac{1}{\omega ^{N_0(k -j)} - 1} \sum _{t = 0}^{N_0 - 1} \omega ^{(k - j)t} \sum _{\ell = 0}^{N_0 - 1} \omega ^{N_1 \ell (t - m)} = \frac{N_0}{\omega ^{N_0(k-j)} - 1}\omega ^{(k - j)m}. \end{aligned}$$
(8)

Here we used

$$\begin{aligned} \sum _{\ell = 0}^{N_0 - 1} \omega ^{N_1 \ell (t - m)} = \left\{ \begin{array}{cl} N_0 &{}\text {if~} t = m,\\ 0 &{}\text {else}, \end{array}\right. \end{aligned}$$
(9)

which is guaranteed by Theorem A.1(i).

Case \(j = k\). In this case, the identity

$$\begin{aligned} \frac{N_0}{\omega ^{N_1 \ell } - 1} = \sum _{t = 0}^{N_0 - 1} t \omega ^{N_1 \ell t} \end{aligned}$$

derived from Theorem A.1(ii) yields

$$\begin{aligned} \sum _{\ell = 0}^{N_0 - 1} \omega ^{-N_1 \ell m} A_{j,j}^{(\ell )}= & {} \frac{N_0 N_1 - 1}{2} + \sum _{\ell = 1}^{N_0 - 1} \frac{\omega ^{-N_1 \ell m}}{\omega ^{N_1 \ell } - 1}\nonumber \\= & {} \frac{N_0 N_1 - 1}{2} + \frac{1}{N_0} \sum _{\ell = 1}^{N_0 - 1} \sum _{t = 0}^{N_0 - 1} t \omega ^{N_1 \ell (t - m)} \nonumber \\= & {} \frac{N_0 N_1 - 1}{2} + \frac{1}{N_0} \sum _{t = 0}^{N_0 - 1} t \left( -1 + \sum _{\ell = 0}^{N_0 - 1} \omega ^{N_1 \ell (t - m)}\right) . \end{aligned}$$
(10)

With (9), we obtain

$$\begin{aligned} (10)= & {} \frac{N_0 N_1 - 1}{2} - \frac{1}{N_0}\sum _{t = 0}^{N_0 - 1} t + m = \frac{N_0 N_1 - 1}{2} - \frac{N_0 (N_0 - 1)}{2 N_0} + m \\ {}= & {} N_1 \frac{N_0 - 1}{2} + m. \end{aligned}$$

Hence, we get with \(D_{\omega ,N_1}\) defined as above

$$\begin{aligned} Q_N= & {} \sum _{m = 0}^{N_0 - 1} \left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes (N_0 (D_{\omega ,N_1}^\dagger )^m Q_{N_1} D_{\omega ,N_1}^m + m \textrm{id}_{N_1})\\= & {} N_0 \sum _{m = 0}^{N_0 - 1} \left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes ((D_{\omega ,N_1}^\dagger )^m Q_{N_1} D_{\omega ,N_1}^m) + \sum _{m = 0}^{N_0 - 1} m \left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes \textrm{id}_{N_1}\\= & {} N_0 \sum _{m = 0}^{N_0 - 1} \left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes ((D_{\omega ,N_1}^\dagger )^m Q_{N_1} D_{\omega ,N_1}^m) + Q_{N_0} \otimes \textrm{id}_{N_1}, \end{aligned}$$

which completes the proof. \(\square \)

Next, we return to the quantum phase estimation of a unitary operator U with associated Hamiltonian \({\text {Ham}}(U)\) and apply the decomposition in Theorem 10 to rewrite the operator.

5.1 Composed quantum phase estimation

As an attempt to decompose the quantum phase estimate into smaller operations, we use the result in Theorem 10. First and foremost, we see that the operators \(Q_{N_0} \otimes \textrm{id}_{N_1}\) and \(\left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes (D_{\omega ,N_1}^{m \dagger } Q_{N_1} D_{\omega ,N_1}^m)\) for \(m = 0, \dots , N_0 - 1\) commute. Hence, we get by subsequent use of Theorem 6 the following product:

$$\begin{aligned} \textrm{QPE}_N(U)= & {} \exp (-\textrm{i}\hspace{0.55542pt}t Q_N \otimes U) = (T \otimes \textrm{id}_{\mathcal {H}})^\dagger V (T \otimes \textrm{id}_{\mathcal {H}}) \exp (-\textrm{i}\hspace{0.55542pt}t Q_{N_0}\\ {}{} & {} \otimes \textrm{id}_{N_1} \otimes {\text {Ham}}(U)) \end{aligned}$$

with

$$\begin{aligned} T= & {} \exp \left( -\textrm{i}\hspace{0.55542pt}t \sum _{m = 0}^{N_0 - 1} \left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes {\text {Ham}}(D_{\omega ,N_1}^m) \right) \\= & {} \exp \left( -\textrm{i}\hspace{0.55542pt}t \sum _{m = 0}^{N_0 - 1} m \left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes {\text {Ham}}(D_{\omega ,N_1}) \right) \\= & {} \exp \left( -\textrm{i}\hspace{0.55542pt}t Q_{N_0} \otimes {\text {Ham}}(D_{\omega ,N_1})\right) = \textrm{QPE}_{N_0}(D_{\omega ,N_1}) \end{aligned}$$

and

$$\begin{aligned} V= & {} \exp \left( - \textrm{i}\hspace{0.55542pt}t N_0 \sum _{m = 0}^{N_0 - 1} \left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes Q_{N_1} \otimes {\text {Ham}}(U) \right) \\= & {} \exp (-\textrm{i}\hspace{0.55542pt}t\, \textrm{id}_{N_0} \otimes Q_{N_1} \otimes {\text {Ham}}(U^{N_0}))\\= & {} \textrm{id}_{N_0} \otimes \textrm{QPE}_{N_1}(U^{N_0}). \end{aligned}$$

In combination, this yields with \(\textrm{QPE}_{N_0}(D_{\omega ,N_1}^\dagger ) = \textrm{QPE}_{N_0}(D_{\omega ,N_1})^\dagger \) (see Remark 8) the following decomposition

$$\begin{aligned} \textrm{QPE}_N(U)&= (\textrm{QPE}_{N_0}(D_{\omega ,N_1}^\dagger ) \otimes \textrm{id}_{\mathcal {H}}) (\textrm{id}_{N_0} \otimes \textrm{QPE}_{N_1}(U^{N_0})) (\textrm{QPE}_{N_0}(D_{\omega ,N_1}) \otimes \textrm{id}_{\mathcal {H}}) \nonumber \\&\cdot \textrm{QPE}_{N_0}(\textrm{id}_{N_1} \otimes U ). \end{aligned}$$
(11)

Of course, the last term performs a QPE of U with respect to \(n_0\) qubits and ignores the other \(n_1\) qubits in the quantum register associated to \(\textrm{QPE}_N(U)\). The representation in (11) is as well depicted in Fig. 4.

Fig. 4
figure 4

Depiction of the decomposition in (11)

Let us consider for the sake of explanation the case \(n_0 = 1\). Then, we obtain for a one qubit QPE the circuit in Fig. 5. With \(\textrm{QFT}_2 = H\) we deduce the following equivalence in Fig. 5.

Fig. 5
figure 5

Quantum phase estimation with respect to a single phase qubit

If we chose to plug in the representation therein into the circuit in Fig. 4, we see that due to the iterated quantum phase transform many Hadamard transforms do cancel out leading to the result in Fig. 6.

Fig. 6
figure 6

Simplification of the circuit in Fig. 4 for the special case \(n_0 = 1\)

Of course, one might be tempted to iterate this procedure. It is straightforward to show that the resulting circuit contains the circuits used to implement the quantum Fourier transform (cf. [12, Fig. 5.1]). As the demonstration is space-consuming, it is left to the curious reader.

Remark 11

For a recursive construction of a circuit, the case \(n_0 = n_1 = \frac{n}{2}\) is of particular interest. Figure 4 contains four smaller instances of alternative quantum phase estimates. Let us assume in this remark that the alternative QPE for U and \(U^{N_0}\) cost the same for the same number of ancilla qubits. Then the overall complexity of the circuit depends on the question, whether a simplified circuit for the alternative QPE of \(D_{\omega , N_1}\) can be found. If, for instance, one could find for the latter a circuit with complexity \({\mathcal {O}}(n)\), then the algorithmic master theorem would yield an overall complexity of \({\mathcal {O}}(n \log (n))\). Whether such a circuit exists is an open question and hence no performance gain is claimed.

5.2 Nested quantum phase estimation

The recursive application of the results in the previous section might be inefficient due to the repeated application of Hadamard transforms that cancel out. This requires in practice additional steps to simplify the resulting circuit prior to its implementation. However, in this subsection we want to provide an alternative decomposition of the quantum phase estimation. By definition holds

$$\begin{aligned} \left| {v_m}\right\rangle \left\langle {v_m}\right| = \textrm{QFT}_{N_0}^\dagger \left| {m}\right\rangle \left\langle {m}\right| \textrm{QFT}_{N_0} \text {~and~} Q_{N_0} = \textrm{QFT}_{N_0}^\dagger C_{N_0} \textrm{QFT}_{N_0}. \end{aligned}$$

Hence, we can apply Theorem 6 and obtain

$$\begin{aligned}{} & {} \exp (- \textrm{i}\hspace{0.55542pt}t Q_N \otimes {\text {Ham}}(U))\\{} & {} \quad = \exp \left( -\textrm{i}\hspace{0.55542pt}t N_0 \sum _{m = 0}^{N_0 - 1} \left| {v_m}\right\rangle \left\langle {v_m}\right| \otimes D_{\omega ,N_1}^{m\dagger } Q_{N_1} D_{\omega ,N_1}^m \otimes {\text {Ham}}(U) - \textrm{i}\hspace{0.55542pt}t Q_{N_0} \otimes \textrm{id}_{N_1} \otimes {\text {Ham}}(U) \right) \\{} & {} \quad = (\textrm{QFT}_{N_0}^\dagger \otimes \textrm{id}_{N_1} \otimes \textrm{id}_{\mathcal {H}}) \cdot W \cdot (\textrm{QFT}_{N_0} \otimes \textrm{id}_{N_1} \otimes \textrm{id}_{\mathcal {H}}) \end{aligned}$$

with

$$\begin{aligned} W = \exp \left( -\textrm{i}\hspace{0.55542pt}t N_0 \sum _{m = 0}^{N_0 - 1} \left| {m}\right\rangle \left\langle {m}\right| \otimes D_{\omega ,N_1}^{m\dagger } Q_{N_1} D_{\omega ,N_1}^m \otimes {\text {Ham}}(U) {-\textrm{i}\hspace{0.55542pt}t} C_{N_0} \otimes \textrm{id}_{N_1} \otimes {\text {Ham}}(U)\right) . \end{aligned}$$

As the operator \(C_{N_0} \otimes {\textrm{id}_{N_1}} \otimes {\text {Ham}}(U)\) commutes with all \(\left| {m}\right\rangle \left\langle {m}\right| \otimes D_{\omega ,N_1}^{m\dagger } Q_{N_1} D_{\omega ,N_1}^m {\otimes {\text {Ham}}(U)}\) for \(m = 0, \dots , N_0 -1\) we obtain with Theorem 6 the product

$$\begin{aligned} W= & {} \left( V^\dagger \exp \left( -\textrm{i}\hspace{0.55542pt}t N_0 \sum _{m = 0}^{N_0 - 1} \left| {m}\right\rangle \left\langle {m}\right| \otimes Q_{N_1} \otimes {\text {Ham}}(U)\right) V \right) \\ {}{} & {} \exp (-\textrm{i}\hspace{0.55542pt}t C_{N_0} \otimes \textrm{id}_{N_1} \otimes {\text {Ham}}(U)) \end{aligned}$$

with

$$\begin{aligned} V = \sum _{m = 0}^{N_0 - 1} \left| {m}\right\rangle \left\langle {m}\right| \otimes D_{\omega ,N_1}^m \otimes \textrm{id}_{\mathcal {H}}= cD_{\omega ,N_1} \otimes \textrm{id}_{\mathcal {H}}. \end{aligned}$$

Further, we deduce

$$\begin{aligned} N_0 \sum _{m = 0}^{N_0 - 1} \left| {m}\right\rangle \left\langle {m}\right| \otimes Q_{N_1} \otimes {\text {Ham}}(U) = \textrm{id}_{N_0} \otimes Q_{N_1} \otimes {\text {Ham}}(U^{N_0}) \end{aligned}$$

and hence with the definition of the alternative quantum phase estimate that

$$\begin{aligned} W = (cD_{\omega ,N_1}^\dagger \otimes \textrm{id}_{\mathcal {H}}) \cdot (\textrm{id}_{N_0} \otimes \textrm{QPE}_{N_1}(U)) \cdot (cD_{\omega ,N_1} \otimes \textrm{id}_{\mathcal {H}}) \cdot c(\textrm{id}_{N_1} \otimes U). \end{aligned}$$

Hereby, we note that

$$\begin{aligned}{} & {} (cD_{\omega ,N_1} \otimes \textrm{id}_{\mathcal {H}}) \cdot c(\textrm{id}_{N_1} \otimes U)\\ {}{} & {} \quad = \left( \sum _{m = 0}^{N_0 - 1} \left| {m}\right\rangle \left\langle {m}\right| \otimes D_{\omega ,N_1}^m \otimes \textrm{id}_{\mathcal {H}}\right) \left( \sum _{m = 0}^{N_0 - 1} \left| {m}\right\rangle \left\langle {m}\right| \otimes \textrm{id}_{N_1} \otimes U^m \right) \\{} & {} \quad = \sum _{m = 0}^{N_0 - 1} \left| {m}\right\rangle \left\langle {m}\right| \otimes D_{\omega ,N_1}^m \otimes U^m = c(D_{\omega ,N_1} \otimes U). \end{aligned}$$

In other words, U and \(D_{\omega ,N_1}\) are simultaneously controlled by the same subregister. This motivates the representation as a nested quantum phase estimate given in Fig. 7. In fact, the quantum phase inside with respect to \(N_1\) is not controlled by the other subregister. A closer inspection of the circuit in Fig. 7 reveals that the first and last operations are the QFT and its inverse with respect to \(n_0\) qubits. All the operations in between are either independent of or controlled by these qubits. As this resembles the circuit in Fig. 3 we call this the nested representation.

Let us point out that both, composed and nested QPE are recursive decompositions of the alternative quantum phase estimation introduced in Sect. 4.

Fig. 7
figure 7

Nested representation

6 Conclusion and outlook

In this work, we proposed an alternative quantum phase estimation. We were capable to demonstrate that this modification has indeed many interesting and convenient mathematical properties. For the analysis, we used formulas for the operator exponential of projection-based tensor decompositions.

Addressing the latter, it is not clear whether such a decomposition exists for all tensor decompositions of the underlying space. Clearly, the diagonalization is such a case, but are they more generally available? Even if not, we have seen that there are cases that comfortably fit into this framework. In particular, the formulas in Theorem 3, Corollary 4 and Theorem 6 seem to be attractive for automated compilation schemes, as it decomposes a possibly large operator into smaller ones. This might enable a recursive build of the circuit and has in principle been demonstrated in Sect. 5, besides no performance gain has been proven.

The QPE is built upon the quantum Fourier transform. There are generalizations of the Fourier transform to nonabelian finite groups, see [15, Chapter 15], where the classical Fourier transform can be interpreted as a special case on a cyclic group. The matrix representation of the latter using permutation groups is exactly the set of powers of the shift matrix. As we have seen, the QPE multiplier is a symmetric matrix that is a complex linear combination of powers of the shift matrix with eigenvalues \(0, 1, \dots , N-1\). One might be tempted to use this observation as a starting point to construct generalized quantum phase estimations upon nonabelian groups by substituting the shift with the corresponding matrix representations and adapting the coefficients. Therein, the ancilla qubit would encode an element from the underlying group. All of this is, however, left for future investigations.