Unsupervised Quantum Gate Control for Gate-Model Quantum Computers

In near-term quantum computers, the operations are realized by unitary quantum gates. The precise and stable working mechanism of quantum gates is essential for the implementation of any complex quantum computations. Here, we define a method for the unsupervised control of quantum gates in near-term quantum computers. We model a scenario in which a tensor product structure of non-stable quantum gates is not controllable in terms of control theory. We prove that the non-stable quantum gate becomes controllable via a machine learning method if the quantum gates formulate an entangled gate structure.


Related works
The related works are as follows.
The theoretical background of the gate-model quantum computer environment utilized in our manuscript can be found in 13 and 14 .
In 14 , the authors studied the subject of objective function evaluation of computational problems fed into a gate-model quantum computer environment. The work focuses on a qubit architectures with a fixed hardware structure in the physical layout.
A scheme for the evaluation of objective function connectivity (computational pathway) in gate-model quantum computers has been proposed in 21 . Objective function examples can be found in 10,11 . A method for the optimization of the measurement procedure in gate-model quantum computers has been defined in 72 . An approach for the stabilization of the state of the quantum computer in an optimal state has been discussed in 74 . A framework for the design of quantum circuits for gate-model quantum computers has been defined in 75 . A method for the optimization of quantum memory units via quantum machine learning in near-term quantum devices has been defined in 67 .
A control method of coupled spin dynamics and the design of NMR pulse sequences by gradient ascent algorithms has been conceived in 125 .
An optimization algorithm related to gate-model quantum computer architectures is defined in 13 . In 126,127 , the authors studied some relevant attributes of the algorithm. An application of the optimization algorithm to a bounded occurrence constraint problem can be found in 18 .
In 40 , the authors studied the objective function value distributions of the optimization algorithm. In [41][42][43] , the authors analyzed the experimental implementation of the algorithm on near-term gate-model quantum devices.
An approximate approximation on a quantum annealer has been studied in 128 . In 129 , the authors concealed approximate quantum adders with genetic algorithms, and analyzed the experimental scenarios. The proposed model employs a machine learning algorithm via genetic algorithms, for optimizing a quantum circuit in terms of the best gate sequence to be applied to achieve a certain global unitary operation.
In 15 , the authors defined a gate-model quantum neural network model. A training method has been proposed in 73 . For a review on the noisy intermediate-scale quantum (NISQ) era, we suggest 1 . On the subject of quantum computational supremacy, see 4 . The complexity-theoretic foundations of quantum supremacy is studied in 3 . A survey on quantum channels can be found in 24 , while for a survey on quantum computing, see 130 .
System model. The system model consist of n unitary gates, U i , i = 1, …, n, that output quantum states ϕ i , which are placed onto the Q b quantum bus 39,[48][49][50][51] . For simplicity, we assume qubit systems; therefore, the quantum systems are d = 2 dimensional, and Q b is a qubus. In the Q b qubus, for each ϕ i an auxiliary qubit system 0 i is associated via a CNOT gate. In a physical layer representation, the probe beam is a continuous quantum variable, i.e., a collection of a large number of photons implementable by laser or microwave pulses 39,[48][49][50][51]. The CNOT gate refers to the interaction between the output states and the auxiliary systems.
To identify the correctness of the quantum gates, for each U i , a reference angle ±θ i is associated in the phase space (i.e., the phase of 0 i is rotated in the S phase space by an angle ±θ i ). The actual phase space angle of U i is identified through the measurement of 0 i via the M homodyne measurement 39,131 . The measurement results are post-processed by P post-processing unit and then fed into the C machine learning control block that achieves the calibration of the U i quantum gates.
Finally, the system model contains an operator U C for the direct correction of the actual ϕ i states on Q b and a second homodyne measurement M b that creates entanglement between the calibrated states via the measurement of the (n + 1)-th beam 39,131 The aim of the machine learning-based gate controlling procedure is to calibrate the working mechanism of the quantum operations via the derivation of a C(·) control function. The C(·) control function requires the construction of a system model by C from measurement information provided by an M measurement phase. The measurement information is post-processed via a P post-processing phase and are then fed into the C procedure to determine the optimal control function.
Without loss of generality, as vector M refers to the measurement results, then the output of C is defined as where ∂ is the control parameter. The s = P(M) system state is associated with a cost function f s , while the ∂ control parameter is associated with a cost function f ∂ . The functions f s and f ∂ formulate the f C cost function subject to a minimization as C s via the determination of an optimal control function C * (s) as = .
∀ C s f s ( ) arg min ( ) Identify the unstable and stable gates. The unstable and stable unitaries of the gate-model quantum computer can be identified via a homodyne measurement applied on the auxiliary quantum states of the quantum bus. The measurement extracts relevant information about the quantum gates to determine the stable and unstable unitaries. The method and results are given by Theorem 1. Theorem 1(Identify the unstable and stable gates). The unitary operators of the n quantum gates U i , i = 1, …, n of the quantum computer can be extracted via a M homodyne measurement of n auxiliary quantum systems be an auxiliary system measured by a homodyne measurement M. This measurement serves for the identification of the imperfections of the U i , i = 1, …, n gates via the ϕ i output systems.
In the system model, each 0 i auxiliary system is physically realized by a probe beam (e.g., laser or microwave pulse). A particular i-th probe beam is, in fact, a continuous-variable that contains a large number of photons, each of which interacts with the i-th output state, ϕ i (logically, this interaction is represented by the CNOT gate between an i-th pair, ϕ i and 0 i ). The n probe beams are then measured by the M homodyne measurement block 39,131 , such that n continuous variables are generated on its output.
Without loss of generality, the interaction for an i-th qubit can be described by the effective form of cross-Kerr nonlinearity 39,[48][49][50][51] via the H i int interaction Hamiltonian as i , the quantities Δ i and λ i can be determined as where x and θ i are known parameters. In fact, we do not have to know whether the actual state of , since only the difference between the actual angle θ ′ i and the reference angle θ i (see (10) and (11)) is required to establish the C block.
An i-th gate U i can therefore be referred via the following operations in function of (10) and (11): In the next step, the ϕ i states are entangled by the M b homodyne measurement block. For a particular pair ϕ ϕ | 〉 { , } i j , the aim of the quantum bus 39,[48][49][50][51] is to achieve the entangled system |Φ〉 = U i U j |β〉, where β is a Bell state, while U i and U j are the unitaries of the i-th and j-th unitary gates. After the M b measurement, the operations U i and U j therefore formulate the entangled system U i U j , since ϕ ψ 〉 = 〉 U i i i and U j j j ϕ ψ | 〉 = | 〉 for some inputs ψ i and ψ | 〉 j . The interaction Hamiltonian for the probe beam 0 b is , where χ b is the strength of the nonlinear interaction 39,48-51 . For a given interaction time t b , the interaction with a particular ϕ i causes a rotation ω ± i b www.nature.com/scientificreports www.nature.com/scientificreports/ in the angle of the probe beam 0 b with angle ω , an auxiliary NOT gate is applied to either qubit of an ij pair ϕ ϕ | 〉 | 〉 { , } i j . Therefore, the unstable and stable quantum gates can be identified via Q b and M, that concludes the proof. ■ NISQ applications. A straightforward NISQ 1 application of the system model is in trapped ion scenarios or in superconducting circuits. The explicit number of gates, gate fidelities, and total error of the protocol are external parameters in the system model that depend on the actual physical-layer apparatus. The control theory behind the system model and the definition of the machine learning control unit makes implementable the results via near-term technologies in experiment. In particular, a near-term application is in qubit gate-model quantum computer architectures considering the case of a large number of qubits and quantum gates,  n 1 2,5-7 . As a future work, our aim is to analyze the performance of the system model in these scenarios.
The proposed system model utilizes a Q b quantum bus, however U C controlling block, the P post-processing block and the C machine learning control block can also be implemented in different practical scenarios. As follows, the system model is not limited for quantum buses allowing a widespread application in experiment. Other practical application scenarios of the results include measurement control problems and measurement optimization in quantum computations, qubit control and readout, objective function evaluation in gate-model quantum computes for solving optimization problems, and optimization of tasks of measurement-based quantum information processing. An aim is to extend the application of the proposed system model into these directions also.
The schematic model of the quantum gate controlling method is depicted in Fig. 1 47 . For simplicity, the figure shows only one-qubit unitaries, however the results hold for arbitrary quantum gates. The U C , P, and C operations are defined in Section 4.

Quantum gate control
The aim of the C block is to achieve a machine learning-based method for controlling the unitary gates using the results of the M homodyne measurement block post-processed by P. The U C operation for controlling the quantum states directly on the qubus is also defined. First, we give the problem statement in terms of control theory 115-117 . Method. Let us assume that for each i-th quantum system ϕ i , a reference angle θ i is defined (see Theorem 1).
This angle identifies a correct working mechanism of the unitary gate U i . Focusing on qubit gates, for an i-th gate, the reference operation U i is defined as For each U i , a reference phase state angle θ i is defined. For each ϕ i an auxiliary system 0 i is set using CNOT gates. The auxiliary qubits are measured by the first homodyne measurement block M. The measurement results (double lines refer to classical information) are processed by a P post-processing block, and by a C machine learning control block. Using the results of C, operator U C corrects of the ϕ i states on Q b . The second homodyne measurement, M b , entangles the corrected states of Q b using the probe beam 0 b . www.nature.com/scientificreports www.nature.com/scientificreports/ where t U i is the application time of unitary U i ,  is the reduced Planck constant (we set  = 1), and I is the identity operator, while H U i is a Hamiltonian with energy E i : where f i is the frequency: Focusing on a particular pair { , } i j ϕ ϕ | 〉 | 〉 , the corresponding U i and U j reference operations are identified as follows: Let us assume that the application time of the U i unitary is , y > 0. Then, by introducing quantities A and B for U i , as U i and quantities C and D for U j , as U j the U i and U j operations can be rewritten as In the control problem, we assume a scenario in which the U i gate works improperly, which leads to imperfect oscillations, while U j works perfectly. The aim of the C is to achieve the stabilization of U i using the fact that M b creates the entangled structure U i U j , since M b entangles the qubus states. The challenge here is therefore the stabilization of U i such that it randomly oscillates (i.e., U i is non-stable) while U j is stable in U i U j . In the control problem, this random oscillation cannot be corrected by a controlling parameter applied directly to U i . The problem is then to find a way to correct the random oscillations by exploiting the fact that U i U j is an entangled structure.
As we show in Theorem 2, in an entangled structure U i U j , it is possible to fix the random oscillations of U i by controlling U j . On the other hand, if ⊗ U U i j is a product system, then calibration is not possible.
Theorem 2 (Controlling of entangled gate structure). In an entangled gate structure U i U j , a randomly oscillating non-stable gate U i is controllable via a stable gate U j . In a product system ⊗ U U i j , the non-stable gate U i is not controllable via the control of a stable gate U j .
Proof. First, let assume that U i and U j are formulating the entangled structure U i U j via the M b measurement on the qubus. Using the parameters A, B of U i (see (16) and (17)) and C, D of U j (see (18) and (19)), the controlling problem in terms of control theory 115-117 is as follows.
Using a Galerkin expansion and a generalized mean-field system formulation 115 for the description of the controlling, for a non-stable gate U i in the joint system U i U j , a growth rate [115][116][117] parameter μ i is defined as where β i 0 is the initial growth rate [115][116][117] , β i i is the parameter for growth-rate change of μ i due to A B ( ) where F i is a parameter for the frequency defined as For unitary U j , we define μ j as where β j 0 is the initial growth rate, β j i is the parameter for growth-rate of μ j due to A B ( ) 2 2 + , while β j j is the parameter for growth-rate of μ j due to where F j is a parameter for the frequency as where ∂ is a control parameter.
Since for the U i U j entangled structure, in (22)  β + are non-vanishing, making the U i gate to be controllable via U j . This connection still holds for U i U j after some simplifications of the system model.
Let simplify the description U i U j , as follows. For U i , let use F i = 1, and set β β (22). Then, by using (20) and (21), we redefine (22) as After the M b measurement, the yielding system of U i can be evaluated via (30) as , thus (26) can be rewritten as  Thus, (27) and (29) can be reevaluated as β + are non-vanishing in (30). However, this is not the case if ⊗ U U i j formulate a product state system with unentangled gates.
The system model of the product system ⊗ U U i j is derived follows. Let assume that gates U i and U j are formulating a product state system ⊗ U U i j . In this case, the gates U i and U j in ⊗ U U i j are unentangled, thus modifications required in the system model.
In terms of control theory, the ⊗ U U i j product system is analogous to a linearization around the (fixed point of the model). This linearization breaks the entangled structure U i U j , leading to β β β (22), thus (22) picks up the formula of As follows from the system model (38)(39)(40)(41) of ⊗ U U i j , for U i the quantity + A B 2 2 grows without bound (i.e., U i is non-stable), while for U j , the quantity C D 2 2 + converges to zero for ∂ = 0 (i.e., U j is stable) [115][116][117] ,. Thus, in terms of control theory, in system (38)(39)(40)(41), the randomly fluctuating quantum gate U i cannot controlled by U j . As a corollary, while U i is controllable in the entangled structure U i U j , in a tensor product system ⊗ U U i j is not controllable.
The proof is concluded here. ■ Cost function. The cost function f C (U i U j ) for the controlling of the U i U j entangled gate structure is a subject to a minimization, and defined as 2 where ∂ is the control parameter (75), while γ is a penalization parameter [115][116][117] . Let C(U i U j ) be a control function defined for the joint structure U i U j as The terms (45), (46) and (47) will be specified further in Section 5 via the determination of the controlling function C(U i U j ).

Post-processing. Lemma 1 P post-processing on the results of the M homodyne measurement yields the estimations of the unitaries of the quantum gates.
Proof. Focusing on a gate-pair {U i , U j }, the aim of the P post-processing method is to achieve the estimates ∼ A,  B and  C, ∼ D using the results of the M measurement. The estimated quantities are then fed into the C block that achieves the automated control of the quantum gates.
The quantities A, B C, and D are derived from the M measurement as follows: Let us focus on a i-th unitary U i with quantities A, B and reference phase space angle θ i . The quantities Δ i (10) and λ i (11) are also computed in the P post-processing phase using the  M( 0 ) i | measurement (see (9)) of the i-th probe beam  0 i . These steps yield the estimates ∼ A and  B as follows: Since at a particular t U i application time of U i , at Δ i = 0 or λ i = 0, Therefore, for Δ i ≠ 0, the V i unitary is performed instead of U i : where i θ ′ is given in (7), and φ t i is as where θ − ′ i is as given in (8) and ϕ t i is as These results straightforwardly follow for U j , with the corresponding parameters Δ j , λ j , t U j , reference angle θ j , and ς j . ■ The machine learning-based control of the randomly oscillating non-stable gate U i in the U i U j joint structure is discussed in Section 5.

Theorem 3 (Quantum gate calibration). For an entangled gate structure U i U j with a non-stable U i , the C block calibrates the quantum gates via the optimal control function
where ∏ is a controlling amplitude, while ∼ A,  B,  C, ∼ D are determined via P post-processing.
Proof. The C block gets as input the post-processed results , ) control function of the joint system U i U j is evaluated via the C block, where ∼ A,  B ,  C , ∼ D are determined by P post-processing step.
The C block operates via a set S f of operations, as where s e is a set of elementary operations S e = {±, ×, /}, while S t = {exp, sin, ln, tanh} is a set of transcendental functions [115][116][117] .
Focusing on a particular pair of unitaries {U i U J }, where U i is not stable while U j is a stable gate, the C block iterates until the optimal control function C * (U i U j ) is determined. The output of the C block is the ∂ * optimal control parameter of the for the joint structure U i U j , as , , ) is an optimal control function using the post-processing results while ∂ 2 is a stabilization parameter associated with the stable gate U j , as 2 From (60), (61), and (62), C * (U i U j ) is yielded as such that the quantities of (61) and (62) are determined by C using the set of (59).
We also give the form of C * (U i U j ) with respect to the cost function f C (U i U j ). For this purpose, we also introduce time parameters for the controlling mechanism.
Let T L be the time interval defined for the controlling as where x , x refer to the upper and lower bound on x, while ϑ is a decay rate parameter for the controlling, defined as For the activation of the C block, the A L activation parameter is defined as www.nature.com/scientificreports www.nature.com/scientificreports/ where h(·) is the Heaviside function [115][116][117] and β i 0 is as shown in (22). As A L > 0, the C block starts the calibration of the quantum gates; otherwise, there is no calibration in the system.
Then let T P be the period time for one controlling cycle, defined as Let ∏ be the controlling amplitude and L act max be maximal actuation level, as Using ∏ and a quasi-equilibrium assumption [115][116][117] , the parameter of (65) can be rewritten as where l is defined as The ∂ ⁎ f cost in function f C (U i U j ) is therefore analogous to an L act average actuation level at a particular ∼ A and  B , as where γ is as in (42), while L act is as The optimal ∂ * = C * (U i U j ) control function is therefore as is the cost function defined in (72).
The proof is concluded here. ■ Direct L algorithm. Here we give the steps of the C controlling procedure assuming that there is no activation function (66) in the C block (referred to as Direct L Algorithm) and the U i U j system is simplified as given by (31)(32)(33)(34)(35)(36). The steps are summarized in Algorithm A.1.
www.nature.com/scientificreports www.nature.com/scientificreports/ Controlling on the quantum bus. Lemma 2 The quantum states placed onto the qubus can be calibrated by operation U C .
Proof. The proof assumes that the aim of U C is the correction of the qubus states before the M b measurement is performed.
The ϕ i , i = 1, …, n quantum states placed onto the qubus are transformed into the reference state by the operation (qubus operation), where U C i is the operation associated with the i-th qubit. The controlling is as follows.
Since for a particular ϕ i , the difference in the reference phase space angle ±θ i of an i-th gate U i can be identified by (10) and (11) via the M measurement and P post-processing, for Δ i ≠ 0, a correction operator ∆ U C i, i can be straightforwardly defined as where ς is a real number, and η where n is a unit vector as = = n n n n a L b L c L ( , , ) ( / , / , / ) where φ i is given in (53).
For λ i ≠ 0, a correction operator λ U C i, i can be straightforwardly defined as where ϕ i is given in (57), and with the corresponding a, b, c and C parameters of the Hamiltonian λ H C i, i . The operators (77) and (82)  The proof is therefore concluded here. ■

conclusions
Here, we defined a method for unsupervised control of entangled quantum gates in gate-model quantum computers and near-term quantum devices. The framework utilizes the terms of control theory for the description of the control problem. The system model uses the quantum bus scheme that correlates the gate outputs with auxiliary probe beams. The probe states are measured to provide information to a post-processing unit and are then inputted into the machine learning control. The entangled gate structure is achieved by a second measurement block that entangles the gate outputs, leading to an entangled gate structure. We showed that if the quantum gates are entangled, the non-stable gate is controllable by a stable quantum gate; however, if the gates formulate a product system, then the random oscillations of the non-stable gate are not controllable in terms of control theory. The solution stabilizes the quantum gate structure via the derivation of an optimal control function that minimizes a particular cost function. The framework provides an implementable solution for experimental quantum computations and for near-term quantum computer architectures in the quantum Internet.
Submission note. Parts of this work were presented in conference proceedings 47 . Ethics statement. This work did not involve any active collection of human data.