1 Background, Motivation, and Results
In early 1980s emerged a groundbreaking idea of exploiting quantum physics to build mechanical computing devices, dubbed as quantum computers, which have completely altered the way we used to envision “computers.” Subsequent discoveries of efficient quantum computations for factoring positive integers  and searching unstructured databases  over classical computations prompted us to look for more mathematical and practical problems solvable effectively on quantum computers. Efficiency in quantum computing has since then rapidly become an important research subject of computer science as well as physics.
As a mathematical model to realize quantum computation, Deutsch  introduced a notion of quantum Turing machine (or QTM, in short), which was later discussed by Yao  and further refined by Bernstein and Vazirani . This mechanical model largely expands the classical model of (probabilistic) Turing machine by allowing a physical phenomenon, called quantum interference, to take place on its computation. A different Hamiltonian formalism of classical Turing machines was also suggested by Benioff . A QTM has an ability of computing a quantum function mapping a finite-dimensional Hilbert space to itself by evolving unitarily a superposition of (classical) configurations of the machine, starting with a given input string. To express the unitary nature of quantum computation, however, a QTM requires to its mechanism the so-called well-formedness condition on a single-tape model of QTMs  and a multi-tape model [33, 34] as well as .
Bernstein and Vazirani further formulated a new complexity class, denoted by , as a collection of languages recognized by well-formed QTMs running in polynomial time with error probability bounded from above by . Its functional extension, , consists of string-valued functions in place of languages.
From a different viewpoint, Yao  expanded Deutsch’s  notion of quantum network and formalized a notion of quantum circuit, which is a quantum analogue of classical Boolean circuit. Different from a classical circuit model, a quantum circuit is composed of quantum gates, each of which represents a unitary transformation acted on a Hilbert space of a small, fixed dimension. To act as a “programmable” unitary operator, a family of quantum circuits requires the so-called uniformity condition. Yao further demonstrated that a family of quantum circuits is powerful enough to simulate a well-formed quantum Turing machine. As Nishimura and Ozawa  pointed out, the uniformity condition of a quantum circuit family is necessary to precisely capture quantum polynomial-time computation. With this uniformity condition, and are characterized exactly by uniform families of quantum circuits made up of polynomially many quantum gates.
This paper takes the third approach toward the characterization of quantum polynomial-time computability. Unlike the aforementioned mechanical device models, our approach is to extend the schematic (inductive or constructive) definition of (primitive) recursive functions on natural numbers. Such a schematic definition was thought in the 19th century by Peano , opposed to the definition given by Turing’s  machine model. This classical scheme comprises a small set of initial functions and a small set of rules, which dictate how to construct a new function from the existing functions. For instance, primitive recursive functions are built from the constant, successor, and projection functions by applying composition and primitive recursion finitely many times. In particular, the primitive recursion introduces a new function whose values are defined by induction. Recursive functions (in form of -recursive functions [17, 18]) further require an additional scheme, known as the minimization (or the least number) operator. These functions coincide with the Herbrand-Gödel formalism of general recursive functions (see ). For a historical account of these notions, refer to, e.g., . Similar schematic approaches to capture classical polynomial-time computability have already been sought in the literature [7, 8, 9, 22, 32]. Those approaches have led to quite different research subjects from what the Turing machine model provides.
Our purpose of this paper is to give a schematic definition of quantum functions to capture the notion of quantum polynomial-time computability and, more importantly, to make such a definition simpler and more intuitive for a practical merit. Our schematic definition (Definition 3.1) includes a set of initial quantum functions, (identity),
(negation of a qubit),(phase shift by ), (rotation around -axis by angle ), (swap between two qubits), and (partial projective measurement), as well as construction rules, composed of composition (), branching (), and quantum recursion (). Our choice of these initial quantum functions and construction rules stems mostly from a certain universal set of quantum gates in use. Nonetheless, our quantum recursion is quite different in nature from the primitive recursion used to build primitive recursive functions. Instead of using the successor function to count down the number of inductive iterations in the primitive recursion, the quantum recursion uses the reduction of the number of accessible qubits needed for performing a specified quantum function. Within our new framework, we can implement typical unitary operators, such as the Walsh-Hadamard transform (WH), the controlled-NOT (CNOT), and the global phase shift (GPS).
An immediate merit of our schematic definition is that we can avoid the cumbersome introduction of the well-formedness condition imposed on a QTM model and the uniformity condition on a quantum circuit model. Another advantage of our schemata is that each scheme has its own inverse; namely, for any quantum function defined by one of the schemata, its inverse is also defined by the same kind of scheme. For instance, the inverses of the quantum functions and introduced in Definition 3.1 are exactly and , respectively (Proposition 3.4).
For a further explanation, here, we want to introduce a succinct notation of (where is pronounced “square”) to denote the set of all quantum functions built from the initial quantum functions and by sequentially applying the construction rules. Notice that the partial measurement () is not a unitary operator. Without use of , we obtain a natural subclass of , which we denote by . Briefly, let us discuss clear differences between our schematic definition and two early formalisms in terms of QTMs as well as quantum circuits. Two major differences are listed below.
1) While a single quantum circuit takes a fixed number of input qubits, our quantum function takes an “arbitrary” number of qubits as an input similarly to QTMs. Since a QTM has an infinite tape, it can use an arbitrary number of tape cells during its computation as extra storage space, whereas any -function must be constructed using the same number of qubits as its original input in a way similar to quantum circuits.
2) The two machine models exhort an algorithmic description to dictate the behavior of each machine; more specifically, a QTM uses a transition function, which algorithmically describes how each step of the machine acts on certain qubits, and a family of quantum circuits uses its uniformity condition to render the design of quantum gates in each quantum circuit. Unlike these two models, every -function has no mechanism to store information on the description of the function itself but the construction process itself specifies the behavior of the function.
As a consequence, these differences help -functions take a distinctive position among all possible computation models characterizing quantum polynomial-time computability.
In Section 3.1, we will formally present our schematic definition of - functions (as well as -functions) and show in Section 4.1 that (also ) can characterize all functions in . More precisely, our main theorem (Theorem 4.1) asserts that any function from to in can be characterized by a certain polynomial and a certain quantum function in such a way that, with use of an appropriate coding scheme, in the final quantum state of on instances and , we observe with high probability. The main theorem will be split into two lemmas, Lemmas 4.2 and 4.3. The former lemma will be proven in Section 4.1; however, the proof of the latter lemma is so lengthy that it will be postponed until Section 5. In this latter lemma, we will construct a -function that can simulate the behavior of a given QTM.
Notice that, since is a special case of , is also characterized by our model. In our characterization proof, we will use a result of Bernstein and Vazirani  and that of Yao  extensively. In Section 4.2, we will apply our characterization, in help of a universal QTM shown in [5, 24], to obtain a quantum version of Kleene’s normal form theorem [17, 18], in which there is a universal pair of primitive recursive predicate and function that can describe the behavior of every recursive function.
Unlike classical computation on natural numbers (equivalently, strings over finite alphabets by appropriate coding schemes), quantum computation is a series of certain manipulations of a vector in a finite-dimensional Hilbert space and we need only high precision to approximate each function inby such a vector. This fact allows us to choose a different set of schemes to capture the essence of quantum computation. In Section 6.1, we will discuss this issue using an example of a general form of the
quantum Fourier transform(QFT). This transform may not be “exactly” computed in our current framework of but we can easily expand to compute the generalized QFT exactly by including an additional initial quantum function.
Concerning future research on the current subject, we will discuss new directions of the subject, including two applications of the main theorem. Our schematic definition provides not only a different way of describing languages and functions computable quantumly in polynomial time but also a simple way of measuring the “descriptional” complexity of a given language or a function restricted to instances of specified length. This new complexity measure will be useful to prove basic properties of -functions in Section 3 and also its future application will be briefly discussed in Section 6.2.
Kleene [19, 20] defined recursive functionals of higher types by extending the aforementioned recursive functions on natural numbers. A more general study of higher-type functionals has been conducted in computational complexity theory for decades [8, 9, 22, 29, 32]. In a similar spirit, our schematic definition enables us to study higher-type quantum functionals. In Section 6.3, using oracle functions, we will define type-2 quantum functionals, which may guide us to a rich field of research in the future.
2 Fundamental Notions and Notation
We begin with explaining basic notions and notation necessary to read through the subsequent sections. Let us assume the reader’s familiarity with classical Turing machines (see, e.g., ). For the foundation of quantum information and computation, in contrast, the reader refers to textbooks, e.g., [16, 23].
2.1 Numbers, Languages, and Qustrings
Let denote the set of all natural numbers (that is, non-negative integers), let be the set of rational numbers, and let be the set of real numbers. For convenience, we set . Given each number , denotes the set . By , we denote the set of complex numbers. Polynomials are assumed to have natural numbers as coefficients and they thus produce nonnegative values from nonnegative inputs. A real number is called polynomial-time approximable§§§Ko and Friedman  first introduced this notion under the name of “polynomial-time computable.” To avoid reader’s confusion in this paper, we prefer to use the term “polynomial-time approximation.” if there exists a multi-tape polynomial-time deterministic Turing machine that, on each input of the form for a natural number , produces a finite binary fraction, , on its designated output tape with . Let be the set of complex numbers whose real and imaginary parts are both polynomial-time approximable. For a bit , indicates . Given a matrix , denotes its transpose and denotes the transposed conjugate of .
An alphabet is a finite nonempty set of “symbols” or “letters.” Given such an alphabet , a string over is a finite series of symbols taken from . The length of a string , denoted by , is the number of all occurrences of symbols in . In particular, the empty string has length . We write for the subset of consisting only of strings of length and set (the set of all strings over ). A language over is a set of strings over , i.e., a subset of . Given a language , its characteristic function is also expressed by ; that is, for all and for all .
For each natural number , denotes a Hilbert space of dimension and any element of is expressed as using Dirac’s “ket” notation. In this paper, we are interested only in the case where is a power of . Any element of that has the unit norm is called a quantum bit or a qubit. By choosing a standard computational basis , we express a qubit as for an appropriate choice of amplitudes satisfying . We also express as a column vector of the form ; in particular, and . In a more general case of , we take as a computational basis of . Note that . Given any number , a qustring of length is a vector of with unit norm; namely, it is of the form , where each is in with since . When with for any , the qustring coincides with , where is the tensor product. The transposed conjugate of is denoted by (using the “bra” notation). When we observe or measure in the computational basis, for each string , we obtain . Notice that a qubit is a qustring of length . The exception is the null vector, denoted simply by , which has norm . Although the null vector could be a qustring of “arbitrary” length , we instead refer to it as the qustring of length . A qustring of length is called basic if for a certain binary string . We often identify such a basic qustring with the classical binary string .
Let . Given each non-null vector in , the length of , denoted by , is the minimal number satisfying ; in other words, is the logarithm of the dimension of the vector . For our convenience, we further set for the null vector and any scalar . Hence, if for a qustring , then must be the null vector or equivalently, the qustring of length . We use the notation for each to denote the collection of all qustrings of length . Finally, we set (the set of all qustrings).
The partial trace over a system of a composite system , denoted by , is a quantum operator for which is a vector obtained from by tracing out . Regarding a quantum state of qubits, we use a handy notation to mean the quantum state obtained from by tracing out all qubits except for the first qubits. For example, it holds for that . The trace norm of a square matrix is defined by , where denotes the trace of a matrix . The total variation distance between two ensembles and of real numbers for a finite index set is .
Throughout this paper, we take the following special conventions concerning three notations, , , and , which respectively express quantum states, the tensor product, and the norm. These conventions slightly deviate from the standard ones used in, e.g., , but they make our mathematical descriptions in later sections simpler and more succinct.
Notational Convention: We tend to abbreviate as for any two vectors and . Given two binary strings and , means or . Let and be two integers with . Any qustring of length is expressed in general as , where each is a qustring of length . This qustring can be viewed as a consequence of applying a partial projective measurement to the first qubits of . Thus, it is possible to express succinctly as . With this new, convenient notation, coincides with , which is simplified as . We further extend this expression to the case of by treating for a scalar as a vector ; similarly, we identify with . In these cases, is treated merely as the scalar multiplication. As a consequence, the equality holds. Concerning the null vector , we take the following treatment: for any vector , (i) , (ii) , and (iii) when is the null vector, . Associated with those conventions on the partial projective measurement , we also extend the use of the norm notation to numbers. When , denotes the absolute value ; more generally, we set for any number to be . As a result, if , then the equation always holds.
2.2 Quantum Turing Machines
We assume the reader’s fundamental knowledge on the notion of quantum Turing machine (or QTM) defined in . As was done in , we allow a QTM to equip multiple tapes and move its multiple tape heads non-concurrently either to the right or to the left, or to make the tape heads stay still. Such a QTM was also discussed elsewhere (e.g., ) and is known to polynomially equivalent to the model proposed in .
To compute functions from to over alphabet , we generally introduce QTMs as machines equipped with output tapes on which output strings are written by the time the machines halt. By identifying languages with their characteristic functions, such QTMs are seen as language acceptors as well.
Formally, a -tape quantum Turing machine (referred to as -tape QTM), for , is a sextuple , where is a finite set of inner states including the initial state and a set of final states with , each is an alphabet used for tape with a distinguished blank symbol satisfying , and is a quantum transition function from to , where stands for . For convenience, we identify , , and with , , and , respectively, and we set . For more information, refer to .
All tape cells of each tape are indexed sequentially by integers. The cell indexed by on each tape is called the start cell. At the beginning of the computation, is in inner state , all the tapes except for the input tape are blank, and all tape heads are scanning the start cells. A given input string is initially written on the input tape in such a way that, for each , is in cell (not cell ). An output of is the content of the string written on an output tape (if has only a single tape, then an output tape is the same as the tape used for inputs) from the start cell, stretching to the right until the first blank symbol, when enters a final state. A configuration of is expressed as a triplet , which indicates that is currently in state having tape heads at cells indexed by with tape contents , respectively. The notion of configuration will be slightly modified in Sections 4–5. An initial configuration is of the form and a final configuration is a configuration having a final state. The configuration space is .
For a nonempty string and an index , denotes the th symbol in . The time-evolution operator of acting on the configuration space is induced from by
where , , , , , and . Here, variables , , and respectively range over , , and . Any entry of is called an amplitude. Quantum mechanics demand the time-evolution operator of the QTM to be unitary.
Each step of consists of two phases: first apply and take a partial projective measurement, in which we check whether is in a final state (i.e., inner states in ). Formally, we define a computation of on input as a series of superpositions of configurations produced sequentially by an application of , starting with an initial configuration of on . If enters a final state along a computation path, the path should terminate; otherwise, its computation must continue.
A -tape QTM , for , is well-formed if satisfies three local conditions (unit length, separability, and orthogonality). To explain these conditions, as presented in [33, Lemma 1], we first introduce the following notations. For our convenience, we set and . For , , and , we define and . Moreover, let , where if and otherwise. We define and , where and .
(unit length) for all .
(orthogonality) for any distinct pair .
(separability) for any distinct pair and for any pair .
The well-formedness of a QTM captures the unitarity of its time-evaluation operator.
(Well-Formedness Lemma of ) A -tape QTM with a transition function is well-formed iff the time-evolution operator of preserves the -norm.
For any subset of , we say that a QTM is of K-amplitude if all values of its transition function belong to .
Let be a nonempty subset of .
A set is in if there exists a multi-tape, polynomial-time, well-formed QTM with -amplitudes such that, for every string , outputs with probability at least .
A single-valued function from to is called bounded-error quantum polynomial-time computable if there exists a multi-tape, polynomial-time, well-formed QTM with -amplitudes such that, on every input , outputs with probability at least . Let denote the set of all such functions .
The use of arbitrary complex amplitudes turns out to make quite powerful. As Adleman, DeMarrais, and Huang  demonstrated, contains all possible languages and, thus, is no longer recursive. Therefore, we usually restrict our attention on polynomial-time approximable amplitudes and, when , we drop subscript and briefly write and . It is possible to further limit the amplitude set to because holds .
2.3 Quantum Circuits
generally, a -qubit quantum gate, for , is a unitary operator acting on a Hilbert space of dimension . Any entry of a quantum state is called an amplitude. Unitary operators, such as the Walsh-Hadamard transform (WH) and the controlled-NOT transform (CNOT) defined as
are typical quantum gates acting on qubit and qubits, respectively. Given a -qubit quantum state , if we apply a quantum gate taking qubits to , then we obtain a new quantum state . Among all possible quantum gates, we use a particular set of quantum gates to construct quantum circuits. Here, a quantum circuit is a product of a finite number of layers, where a layer is a Kronecker product of the controlled-NOT gate and the following three one-qubit gates:
where is a real number with . Notice that equals . Since those gates are known to form a universal set of gates , we call them elementary gates. Note that and (called the gate) can approximate any single qubit unitary operator to arbitrary accuracy. The set of , , and is also universal .
Given an amplitude set , a quantum circuit is said to have -amplitudes if all entries of any quantum gate inside are drawn from . For any -qubit quantum gate and any number , denotes , the -qubit expansion of . Formally, an -qubit quantum circuit is a finite sequence such that each is an -qubit quantum gate with and is a permutation on . This quantum circuit represents the unitary operator , where is of the form and for each .
The size of a quantum circuit is the number of all quantum gates in it. Yao  and later Nishimura and Ozawa  showed that, for any -tape QTM and a polynomial , there exists a family of quantum circuits of size that exactly simulates .
A family of a quantum circuit whose quantum gates is said to be -uniform if there exists a deterministic (classical) Turing machine that, on input , produces a code of in time polynomial in the size of , provided that we use a fixed coding scheme of describing each quantum circuit efficiently.
3 A New, Simple Schematic Definition
As noted in Section 1, the schematic definition of recursive function is an inductive (or constructive) way of defining the set of “computable” functions and it involves a small set of initial functions and a small set of construction rules, which are applied finitely many times to build more complex functions from functions that are already constructed. A similar schematic characterization is known for polynomial-time computable functions (as well as languages) [7, 8, 9, 22, 32]. Along this line of work, we wish to present a new, simple schematic definition composed of a small set of initial quantum functions and a small set of construction rules, and intend to show that this schematic definition precisely characterizes polynomial-time computable quantum functions, where a quantum function is a function mapping to . It is important to note that our term of “quantum function” is quite different from the one used in , in which “quantum function” refers to a function computing the acceptance probability of a multi-tape polynomial-time well-formed QTM and thus it maps (where is an alphabet) to the real unit interval .
3.1 Definition of -Functions
Our schematic definition generates a special function class, called (where is pronounced “square”), consisting of “natural” quantum functions mapping to and it is composed of a small set of initial quantum functions and three natural construction rules. In Definition 3.1, we will present our schematic definition
Hereafter, we say that a quantum function from to is dimension-preserving if, for every and any , implies .
Let denote the collection of all quantum functions that are obtained from the initial quantum functions in Scheme I by a finite number of applications of construction rules II–IV to quantum functions that are already constructed, where Schemata I–IV¶¶¶The current formalism of Schemata I–IV corrects discrepancies caused by the early formalism given in the extended abstract . are given as follows. Let be any quantum state in .
The initial quantum functions. Let and .
1) . (identity)
2) . (phase shift)
3) . (rotation around -axis at angle )
4) . (negation)
5) (swapping 2 qubits)
6) . (partial projective measurement)
The composition rule. From and , we define as follows:
The branching rule. From and , we define as follows:
(i) if ,
The quantum recursion rule. From , , and dimension-preserving with , we define as follows:
(i) if ,
where , and and are either or (identity) but at least one of them must be .
In Scheme I, and correspond respectively to the matrices and given in Section 2.3. The quantum function is associated with a partial projective measurement of the first qubit of in the computational basis if , and it also follows that .
To help the reader understand the behaviors of the initial quantum functions listed in Scheme I, we briefly illustrate how those functions transform basic qustrings of length . For bits with , it holds that , , , , , , and , where .
Since any -function is constructed by applying Schemata I–IV as basic units of the construction steps of , we can define the descriptional complexity of as the minimal number of times when we use initial quantum functions and construction rules in order to construct . For instance, all the initial functions have descriptional complexity and, as demonstrated in the proof of Lemma 3.5, the quantum functions , , and have descriptional complexity at most and and do at most , whereas is of descriptional complexity at most . This complexity measure is essential in proving, e.g., Lemma 3.3 since the lemma will be proven by induction on the descriptional complexity of a target quantum function. In Section 6.2, we will give a short discussion on this complexity measure for a future study.
For our convenience, we also consider a subclass of , called , which constitutes a core part of .
The notation denotes the subclass of defined by Schemata I-IV except for listed in Scheme I.
With no use of in Scheme I, every quantum function preserves the dimensionality of inputs; in other words, satisfies for any input .
The following lemma gives fundamental properties of -functions. For convenience, a quantum function from to is called norm-preserving if for all .
Let be any function in , let , and let .
, where is the null vector.
is dimension-preserving and norm-preserving.
Let be any -function, let , and let be constants. We will show the lemma by induction of descriptional complexity of . If is one of the initial quantum functions in Scheme I, then it is easy to check that they satisfy Conditions 1–4 of the lemma. In particular, when is the null vector , all of , , , , , and used in Scheme I are ; thus, and are also for each bit . Therefore, Condition 1 follows.
Among Schemata II–IV, let us consider Scheme IV since the other schemata are easily shown to meet Conditions 1–4. Let be quantum functions in and assume that is dimension-preserving. By induction hypothesis, we assume that satisfy Conditions 1–4. For simplicity, write for . Here, we will be focused only on Conditions 2 and 4 since the other conditions are easily shown. In what follows, we also employ induction on the length of input given to .
(i) Our goal is to show that satisfies Condition 2. First, consider the case of . It then follows that . Next, consider the case where . From the definition of , we obtain , where . Since , we conclude that for each . It then follows by induction hypothesis that . Thus, we obtain . Using Condition 2 for , we thus conclude that .
(ii) We want to show that satisfies Condition 4. By induction hypothesis, it follows that, for any , and . This implies that , which equals . The last term coincides with , which equals . This implies Condition 4. ∎
Lemma 3.3(4) indicates that all functions in also serve as functions mapping to .
For a quantum function that is dimension-preserving and norm-preserving, the inverse of is a unique quantum function such that, for every , . This quantum function is expressed as .
For any , exists and belongs to .
We prove this proposition by induction on the descriptional complexity of . If is one of the initial quantum functions, then we define its inverse as follows: , , , , and . If is obtained from another quantum function or functions by one of the construction rules, then its inverse is defined as follows: , , and