1. Introduction
Building up a large-scale error-corrected quantum computer is to be one of the greatest scientific and engineering achievements [
1,
2,
3,
4]. However, stringent requirements such as millions of qubits with high accuracy are far to meet. Preskill coined “Noisy Intermediate-Scale Quantum” (NISQ) to describe this era, where NISQ devices represent the current state of the art in the fabrication of quantum devices [
5]. The leading quantum computers contain up to a few hundred physical qubits, but provide rare practical applications as error correction is missing [
6,
7]. Therefore, while polishing the hardware-related techniques, one present-day goal is to exploit the power of current machines.
Matrix evolution is computationally hard in numerical mathematics, as
operations are required for an unstructured
matrix [
8]. With advent of quantum algorithms, this can be solved to some extent by instinct priority of fault-tolerant quantum computation on matrix multiplications. For example, complexity of
t-time analog Hamiltonian evolution is
. Furthermore, certain digital algorithms were proposed for hermitian matrices’ evolution, which produce quantum speedups in many scenarios, such as simulation algorithms, quantum principal component analysis, quantum matrix inversion, and their generalizations [
9,
10,
11,
12,
13,
14,
15]. However, deep quantum circuits and inaccessible oracles are required, which hinder their applications on near term devices. Accordingly, one question need be addressed: How to realize matrix evolution on current NISQ devices?
NISQ algorithms are a class of algorithms with no explicit requirements for error correction, promising to be deployed on NISQ hardware [
5,
16]. In regard to matrix evolution, we explore its near future application by introducing one typical NISQ module–layered circuit. Consequently, in
Section 2, a heuristic protocol is proposed to employ a layered circuit to simulate hermitian matrix evolution, which is experimental friendly and can be employed in near-term applications of algorithms. To generate proper layered circuits, two methods are embedded in this protocol. The first is inspired by optimal control theory, which finds the simulating circuit directly, but with no scalability. The second, averting the scalability problem, generates the simulating circuit by a hybrid quantum-classical paradigm [
17]. Both simulating circuits are with basic quantum gates and a pre-set depth, with the consumption of generating those circuits analyzed in
Section 3. To support feasibility, simulating circuits are generated and validated numerically in
Section 4, where hermitian matrices are set as density matrix of Bell state, GHZ state, and Hamiltonian of Crotonic acid molecular [
18]. Compared with the method such as product formula and density matrix evolution, simulating circuits by our methods are with shallower depth, and more friendly to the experimental realizations. Furthermore, as a generalization of linear combination unitaries and layered circuit [
19,
20,
21], ancillary layered circuit is proposed in our protocol, which not only serves as a quantum compiler here, but also an essential subroutine for NISQ algorithms.
2. Result
For hermitian matrices evolution, Lie–Trotter products and density matrix evolution provide solutions. We briefly review them here.
In the first case, for general Hamiltonian
with
be local interactions,
can be simulated by the lowest order Lie–Trotter product formula [
22],
with
, as shown in the schematic process in
Figure 1a.
denotes the repetition times, and therefore the circuits size and depth for full
with desired accuracy
. Though repeated applications of simulated circuit is feasible in theory, a low-depth quantum circuit is preferred by current NISQ devices as the limited coherence time. Therefore, under the circumstance of a tolerant accuracy, the implementation appears unfriendly to current or near term devices.
In the second case,
is not only Hermitian but also positive semi-definite and unit trace, that is,
is a physical quantum state,
can be realized by multiple copies of
and infinitesimal swap operations [
10]. Assuming that
is another quantum state that
act on, the infinitesimal swap operation has such effect,
where
is the partial trace over
and
S is the swap operator. Shown in
Figure 1b, density matrix evolution with respect to
can be constructed by repeated applications of (
2) with
copies of
. Therefore, if the swap
S and its infinitesimal exponential operation
can be implemented in a single layer circuit, both size and depth of using Equation (
2) are
. For accurate simulation, this depth and size of the circuit still dissatisfy the characteristics of current devices, and thus hinder its near term application.
One typical NISQ module is the layered circuit, which concretely implement near term applications [
23,
24]. Specifically, a
m layered circuit
is presented in
Figure 2a, which is parameterized by
. As NISQ devices are with characteristics such as, limited size, short coherence time, and basic quantum operations, a shallow layered circuit seems perfect to undertake a NISQ applications. Remarkably, although shallow circuits and basic operations are utilized, the expressivity of layered circuits can be nontrivial and has been investigated in some recent papers [
25,
26]. Therefore, in our work, a layered circuit is employed to approach the simulation of matrix evolution, mathematically,
where
is target hermitian matrix.
A layered circuit can be fully determined by its structure and parameters. For most applications, structure is configured previously, which depends on the tasks at hand. The widely used structures include quantum alternating operator ansatz, variational Hamiltonian ansatz and unitary coupled clustered ansatz [
27,
28,
29,
30]. In this study, according to hardware efficiency, we employed an
layered circuit for following
n-qubit tasks. All two body interactions are involved and gates in one layer are commuted with each others, which aims at employing the two-body interactions of the devices with a limited depth circuit. This circuit is problem-agnostic, which is given in
Appendix B For specific problem faced, the circuit should be re-designed, which exploits both expressibility and trainability.
Furthermore, before stepping into parameter determination, ancillary layered circuit is introduced as preliminary. It is schematically presented in
Figure 2b. Besides the principal system which is denoted as
p, the ancillary register
a is added with the same size as Chio-Jamiolkowski isomorphism is employed. The entire circuit includes three parts: encoding circuit (
, colored blue), layered circuit part (
, colored pink), and decoding circuit (
, colored green). The details of dynamics in
Figure 2b are shown as follows.
For initialization, two registers are jointly prepared on
, where
Encoding circuit
is supposed to evolve the system into
, where
are pairs of Bell states. This step can be realized by a bunch of control-
z gates,
and Hadamard gates,
,
Then,
is applied on
p, driving the system into
, i.e., the Choi matrix of
,
Noted that, arbitrary state
with the application of
has a state-channel duality,
Thus, knowing
is sufficient to completely determine
, i.e., converting quantum channel characterization to state characterization. Choi-Jamiolkowski isomorphism is exactly the correspondences in Equations (
6) and (
7).
Finally, is the result generated by steering through the decoding circuit , which disentangles the system and is essential in our methods.
For parameter determination, it can be solved by two optimization methods, which minimize the distance,
where
is the target hermitian matrix. Specifically, we substitute
with
, where
are tensor products of Pauli operators. In this configuration, the problem states as approaching
by
The formalism of determines the structure of layered circuit. It is an empirical task and is set in advance, which we have depicted before.
From the point of view of state, for a specified time
t,
drives an ideal arbitrary system, which is labelled as
, to
Simultaneously, with the application of Equation (
9), the real system is steered to
, where
The objective function
f is thus defined as the overlap which is measured by the standard inner product
where
Obviously,
, the maximum situation is satisfied when the outputs of
and
are the same. This is a state to state situation. To approach the dynamics, Choi matrix is employed, which can be produced by ancillary layered circuit. In this situation, the notations are redefined,
Method 1 is a traditional method of gradient, where the partial derivative with respect to the parameter
are
means trace here. Therefore, by updating
by
with a learning rate
,
the objective function would increase along the direction of gradient until converging into the local maximum. If
is iteratively achieved, this layered circuit is said to approach the application of
.
However, one vital problem is at calculating the gradient. As obtaining and is in general inefficient for tremendous time-consuming. Therefore, Method 2 is reported.
Method 2 is outlined as follows, (i) implementing with a layered circuit, where is a sufficiently short period of time; (ii) implementing with (i) as the starting point step by step, where ancillary layered circuit is used as a compiler and steps are required. This idea is extended from trotter decomposition, which induces a trotter error with . We illustrate the details as follows.
The first step is to realize an approximation,
which requires us realizing following equation if only lowest order is considered,
This is coincident with Lie–Trotter decomposition, where sufficiently small
is adopted. Related details for derivation can be found in
Appendix A. Accordingly, assuming that
is small enough,
can be simulated efficiently by a layered circuit, where structure and parameters are given by Equation (
18).
The second step is to simulate
. On basis of (i), this can be achieved by repeatedly applying ancillary layered circuit as compiler for
times. We depict the
i-th iteration in
Figure 3, where
consists of
and
followed by
times. The ancillary layered circuit serves as a compiler, learning repeated
by
.
represents the compression efficiency,
is known, and the structure of
is set previously. Specifically, the task for
i-th iteration is to generate
with an explicitly prior known
, where
and
are the parameters to be optimized.
The objective function is defined as,
which reaches the maximum at
. As
are pairs of Bell states, this objective function cannot be measured with the local bases directly and efficiently. We investigate the second term in Equation (
19): A decoding circuit
disentangles the target component into
. In this situation, only with the local measurement on
, the objective function can be estimated and optimized as conventional hybrid quantum algorithms [
31]. Iteratively, parameters in
, which are obtained in the
i-th iteration, could be applied in the
-th step, where
is realized.
Accordingly, by
steps,
can be implemented based on
. Compared to repeatedly applications of
which will cause the circuit depth affordable, this strategy trades the circuit depth with repeated applications of ancillary layered circuit(shown in
Figure 3), which increases the training time while compresses the repeated circuit depth.
3. Analysis
To simulate hermitian matrix evolution with layered circuit, time complexity is bounded by the depth of used circuit, which is easily analyzed if circuits are determined. For errors introduced by simulation, it is the distance between target evolution and layered circuit, which is also generated by two embedded methods. Therefore, analysis for embedded methods are important: Learning complexities and learning errors are analyzed in this section.
We list procedures of two methods in the Method 1 and Method 2 and analyze the learning complexity first.
Method 1 relies on a classical optimization to generate parameter configurations. Therefore, complexities for time and memory is based on classical resources, such as classical logic gates and registers. During the procedure, approximating the gradient by Equation (
15) costs the most. For each iteration, calculating
and
lies at the heart, which requires the implementation of matrix multiplications on a classical computer. Though
can be efficiently simulated individually for locality of
, simulating
is in general hard for most cases and there is no even universal efficient algorithms. To simulate an
n-qubit problem,
matrix should be generated and stored, with
operations for evaluating the objective function and obtaining the gradient. Thus, the time complexity is
for a total
r iterations while memory complexity is
. As Choi states are employed, our expedition will be enlarged, qubits are doubled.
Accordingly, this method is in general inefficient. However, it would be applicable to specific circumstances where
and
can be efficiently simulated. In fact, some investigations have employed tensor network to work out certain structure simulation problem and shed the light on the middle-scale quantum systems [
32].
Method 2 is a hybrid quantum classical paradigm, where ancillary layered circuits are executed on quantum computers, parameters are updated on classical computers. For tasks on quantum computers, ancillary layered circuit brings a -qubit consumption on quantum register, where n is the size of simulation quantum system. Time complexity to execute ancillary layered circuit is additional Hadamard and control-z gates, with a depth of layered circuit consisting of at most basic quantum gates. Luckily, our measurement is on , which is local measurement. Therefore, for single iteration, updating all parameters requires times repeatedly applying and measure ancillary layered circuit. For r repetitions, is required. If is to be realized by , an additional multiplied factor should be added. For tasks on classical computers, a storage of parameters and their numerical gradient is required. Time complexity depends only on operations of fundamental arithmetic, which is within the reach of current machines.
Accordingly, time complexity of Method 2 is . As in our configuration, , which leads our method acceptable with respect to efficiency.
Method 1 |
Input: layered circuit . is to be optimized, is an optimized threshold, and is the tolerance for improving. |
Output: , parameter configuration, which is optimized to approach via . |
|
1: Evaluate the objective function Equation (12) with existed , denoted as f. If , go to 2, otherwise, the algorithm terminates and return. |
2: for
do |
3: Based on Equation (14), and are calculated. |
4: Evaluate by Equation (15). |
5: end for |
6: Update m-element according to Equation (16) |
7: Evaluate the objective function with the new |
8: if then |
9: the algorithm terminates and return; |
10: else if then |
11: are re-initialized and go to 1. |
12: else |
13: go to 2. |
14: end if |
15: |
16: |
17: |
18: |
Method 2 |
Input: layered circuit with known . is to be optimized, is the optimized threshold, is the tolerance for improving, and is the compressing factor. |
Output: , parameter configuration, which is optimized to approach via |
|
1: for do |
2: if then |
3: and its inversion are generated by the input. |
4: else |
5: are generated as the output of the last iteration. |
6: end if |
7: Evaluate the objective function in Equation (19) with existed and , which is denoted as f. If , go to 8, otherwise, for return and go to 1. |
8: for are optimized as variant quantum algorithms, are updated and f is evaluated. |
9: if then |
10: return and go to 1; |
11: else if then |
12: are re-initialized and go to 7. |
13: else |
14: go to 8. |
15: end if |
16: end for |
To analyze errors of layered circuit by both methods, first, we define some notations: is the optimized threshold which is supposed to terminate the training process; is the deviations coming from lie-product decomposition.
If
Method 1 is completed, the optimized threshold is targeted. The obtained layered circuit has an accuracy of
as training process permits the error no more than
. For
Method 2, the error accumulates according to a chain rule when implementing
by
. It ends up with an error of
, where the higher order terms are ignored and
s is steps, which is in total of
to realizing
from
. Thus, the discrepancy is
. Additionally, an error coming from Equation (
1) is also considered as
, which is of
. Accordingly, the total error for
Method 2 is
.
In the end of this section, we analyze the expressive power for typical layered circuit, which is given by our appendix method. In fact, it is problem-dependent and can be replaced with smarter ansatz with tasks at hand.
Expressibility is proposed recently as a distance, which measures the output states distribution of layered circuits and the Haar [
26]. To explicitly present this value, Kullback-Leibler (KL) divergence(or relative entropy) is employed to estimate this distance, which is denoted as
Expr. A highly expressible circuit would produce a small Kullback-Leibler value. In this part, besides numerically calculating
of circuit given in
Appendix C, three other types of parametrized circuits are also studied as comparisons, which are also specified in
Appendix C. Three compared circuits are repeated with up to 5 times to calculate
, while our typical circuit stays unchanged.
Figure 4 shows the results of Expressibility values (or KL divergences), where circle, diamond and square represents three comparison circuits and cyan cross labels the circuit given by us. The layered circuit in this work has a similar performance as multi-applications of circuit 2 and 3 in
Figure A1. Remarkably, in general, repeating a circuit layer would increase the expressive power. However, as no entanglement gate exists in circuit 1 in
Figure A1, this argument does not hold for that circuit. More information on expressibility and its simulation can be found in
Appendix C or related work [
26].
4. Numerical Experiments
In this section, numerical experiments are investigated, including applications on Hamiltonian simulation and density matrix evolution. In our protocol,
is taken as (a) Bell state; (b) GHZ state and (c) Hamiltonian of a liquid NMR sample, Crotonic acid, which is specified in the
Appendix E.
To generate the simulating layered circuit, two learning methods are employed, with
being the objective function.
are for
Method 1 and
Method 2. The target state can be expressed as,
And additionally,
, where
To find optimal parameter configuration, gradient-based method is employed. To begin with, random numbers by a single uniformly distribution are generated and assigned as the value of initial parameters. During the training process, the approximation of the partial derivatives can be estimated by following symmetric difference quotient
which can be realized by repeatedly running the training circuit with a small perturbation on the
, where
is naively chosen as
in our simulation. Therefore, the optimal configuration of the parameters can be obtained by repeating
where
and the learning rate,
, is fixed at
. For simulating
Method 1 and
Method 2, the maximum numbers for repeating Equation (
22), i.e., iterations are set as 300 and 350, respectively.
In this prototypical simulation, the program is conducted with assumptions that all one or two quantum gates are accurate. Three circuits with the depths of 3, 4 and 5 are employed for the simulation the evolution. The numbers of parameters to be optimized are thus 12, 24 and 40, which converge to , where m is the depth and n is the size of circuit. As the comparison, if is tolerant error, , and depth circuits are required for simulation by lie-product decomposition. For density matrix evolution, copies of density matrix are required as with -depth circuit.
For data collection, strategies are different for
Method 1 and
Method 2. For
Method 1, once the optimization completed, parameters is supposed to be optimal for simulating a
t-time interval evolution. Otherwise, we need to re-run the simulation and repeat Equation (
22) until the objective function satisfying the optimized threshold. For
Method 2, optimizing ancillary layered circuit is not once for all. After the
i-th repetition of training ancillary layered circuit with Equation (
22) for 350 iterations, only
is learned. Therefore,
repetitions are required. In our simulation,
, i.e., 10 steps are required and the base number, 2, determines the compression efficiency of the circuit.
Figure 5 shows the results of our simulation, which provide supports on our protocol by converging to the target matrix evolutions. (a) (b) and (c) simulate the evolutions of Bell state, GHZ state and Hamiltonian of Crotonic acid, where the evolution timescales are set as
,
and
, respectively. Fidelities are shown by vertical axis and calculated by tracing the inner product of two operators. The results show that, with the accurate local quantum gate assumption, the simulating circuit gets more and more like the evolution of certain matrix evolution as with the number of iterations.
6. Conclusions
NISQ era has come in and would last for decades. Thus, finding a near-future algorithm which exploits the power of NISQ devices becomes more and more important. Simulating matrix evolution, which is an essential module for many quantum algorithms, such as density matrix evolution for quantum principal component analysis, and static or dynamic simulation for quantum systems. The existed implementation still relies on a deep quantum circuit, which is intractable with current NISQ devices.
In this paper, a heuristic layered circuit protocol is proposed for simulating with Hermitian . To construct these circuits, two methods are given. Method 1 is with the classical optimal control theory and Method 2 is with the hybrid quantum-classical paradigm. For Method 1, learning a layered circuit requires operations, where n is the size of quantum circuit and r is the number of total iterations. As computational resource may be put into its limits, we provide Method 2, which is hybridized with a quantum agent. As a comparison, time complexity is , with being the size of circuit and m being circuit depth. From the point of view of error, although Method 1 is in general inefficient, the error can be bounded to . Method 2 introduces a larger one, . Only when is sufficiently small, Method 2 can approach an accuracy as sTrotter method. Accordingly, circuits by both methods would be shallow, which is easily deployed on current devices.
Simulating matrix evolution is important for many quantum information tasks. Our protocol, which realizes hermitian matrix evolutions, is supposed to contribute to the field of NISQ algorithm. For layered circuit in our both methods, only basic quantum gates are required, which means at most 2-qubit interactions are needed. With respect to experimental technology, it is already mature for most physical platforms, such as optical lattice, spin-based, and superconducting qubit [
7,
36,
37]. In despite of some limitations, the protocol is with an affordable computational consumption, which paves a way for possibly applications on NISQ devices. In addition, ancillary layered circuit, which serves as a compiler in this article, is promising to be an important subroutine in near future and provides a new way to exploit the power of NISQ devices.