## Machine-learning based three-qubit gate for realization of a Toffoli gate

## with cQED-based transmon systems

Sahar Daraeizadeh 1, 2 , Shavindra P. Premaratne  2 , Xiaoyu Song 1 , Marek Perkowski 1 , Anne Y. Matsuura 2

- 1 Department of Electrical and Computer Engineering, Portland State University, Portland, Oregon 97201, USA
- 2 Intel Labs, Intel Corporation, Hillsboro, Oregon 97124, USA

We use machine learning techniques to design a 50 ns three-qubit flux-tunable controlled-controlled-phase gate with fidelity of &gt;99.99% for nearest-neighbor coupled transmons in circuit quantum electrodynamics architectures. We explain our gate design procedure where we enforce realistic constraints, and analyze the new gate's robustness under decoherence, distortion, and random noise. Our controlled-controlled phase gate in combination with two single-qubit gates realizes a Toffoli gate which is widely used in quantum circuits, logic synthesis, quantum error correction, and quantum games.

## I. Introduction

## II. Toffoli gate realization

Circuit quantum electrodynamics (cQED) systems [1-3] utilizing transmons [4-5] are one of the potential candidates  for realizing quantum computers  [6],  with  qubit  coherence  times  of hundreds of microseconds [7] and the potential to scale  up  facilitated  by  quantum  error  correction schemes  [8-9]  .  Here,  we  theoretically  design  a three-qubit controlled-controlled phase (CCPhase) gate with fidelity of &gt;99.99% for nearest-neighbor transmons with resonator couplings [10].

Multiple-qubit-controlled-phase gates in transmons are typically designed by  detuning the qubit transition frequencies to approach the avoided-level-crossing regions. In this regime, state mixing or level shifting due to noncomputational quantum levels allows non-uniform phase collection within the computational subspace. This gives rise to entangling operations between qubits [11-16]. Finding the optimal frequency  detuning  for  transmons  to  achieve  the desired avoided level crossings between the system energy levels is a complex task which can benefit from machine learning (ML) approaches [17-19]. Designing  quantum  gates  and  optimized  control pulses using ML  techniques  and  optimization theory has been demonstrated for various quantum systems  [20-23].  We  model  the  quantum  gate design  problem  as  a  supervised  ML  exercise,  by adjusting the system control parameters to converge  on  the  target  gate  unitary  [18].  In  this model, the system parameters can be learned from the training set which is the desired unitary matrix, and the cost function is the gate fidelity.

The Toffoli gate has broad applications in many quantum circuits. The  best-known  decomposition of  the  Toffoli  (controlled-controlled-NOT)  gate using  standard  single-  and  two-qubit  gates  [24] requires multiple single-qubit gates ( 𝐻 𝑇 , , and 𝑇 ற ) and 6 CNOT gates as shown in Fig. 1(a). In this decomposition, at least two of the CNOT gates are applied  to  non-neighbor  qubits  which  results  in addition of four SWAP gates in a nearest-neighbor architecture. There is another decomposition of the Toffoli gate based on five two-qubit gates [25] as depicted in Fig. 1(b) where non-standard two-qubit gates such as  controlledV and controlled𝑉 ற gates are required where 𝑉 ଶ = 𝑋 , and 𝑉𝑉 ற = 𝐼 . In other words, controlledV and controlled𝑉 ற gates can be represented by c√NOT , and c√NOT ற , respectively. The c√NOT ,  and c√NOT ற gates  can  be  realized using controlled-rotation flux-tunable gates in transmons in cQED systems, however, the circuit shown in Fig. 1b, requires two extra SWAP gates to perform a controlled-rotation gate between nonneighbor qubits in a nearest-neighbor architecture.

The decomposition of the Toffoli gate based on single-  and  two-qubit  gates  is  costly.  Another proposed  decomposition  of  the  Toffoli  gate  is based  on  a  three-qubit  CCPhase  gate  and  two single-qubit gates (Hadamard or single-qubit rotation  gates)  as  shown  in  Fig.  1(c).    Here,  we show that a Toffoli gate can be realized in only 90 ns for a resonator-coupled nearest-neighbor transmon  system  utilizing  the  single-qubit  gates (20 ns) [10], and our high fidelity CCPhase gate (50

ns) with realistic frequency detuning sequences and system parameters.

FIG. 1. Toffoli  gate  decomposition circuits. (a) Toffoli circuit based on standard single-qubit and two-qubit gates. (b) Toffoli  gate  circuit  based  on  two-qubit  gates.  (c)  Toffoli circuit based on single-qubits gates and three-qubit controlled-controlled-phase gate

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01092v1-figure-5708e425-ea5e-45f9-8d44-6d44734506f8.jpg)

The  CCPhase  gate  is  designed  to  collect  a 𝜋 phase only on the |111〉 computational state (i.e. when  all  three  qubits  are  in |1〉 state).  For  the CCPhase gate simulation, we consider the lowest four  energy  levels  (labeled |0〉 to |3〉 )  to  ensure system  evolution  within  the  full  three-excitation manifold [15]. However, the cost function evaluation for the ML approach is performed only within the qubit subspace. The unitary operation of the ideal CCPhase gate in matrix form is:

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01092v1-figure-a3d0c959-ed60-441e-8ff7-6921ba6bcadd.jpg)

where the ordering of the states is |000〉 to |111〉 in binary increments.

## III. Simulation of the system dynamics

The effective Hamiltonian for our model with 𝑛 transmons,  when  the  coupling  resonators  are  not populated, can be described as follows [26]:

$$\mathcal { H } = \sum \nolimits _ { k = 1 } ^ { n - 1 } \widetilde { \mathcal { H } } _ { c } ^ { ( k, k + 1 ) } + \sum \nolimits _ { k = 1 } ^ { n } \widetilde { \mathcal { H } } _ { t } ^ { ( k ) } \quad \quad ( 2 )$$

Here, the Hamiltonian of each transmon 𝑘 is:

$$\widetilde { \mathcal { H } } _ { t } ^ { ( k ) } \equiv \Sigma _ { j } \, \widetilde { \omega } _ { j } ^ { ( k ) } | j \rangle _ { ( k ) } \langle j | & & ( 3 ) & & \quad \ \ \ e \varepsilon$$

where 𝜔 ෥ (௝) (௞) is the  dressed  transition  frequency associated with the 𝑘 ୲୦ transmon at energy level 𝑗 and is given by

$$\widetilde { \omega } _ { j } ^ { ( k ) } \equiv j \omega _ { \mathbf q } ^ { ( k ) } + \frac { \delta _ { \mathbf k } } { 2 } ( j - 1 ) j + \frac { j g _ { \mathbf k } ^ { 2 } } { \omega _ { \mathbf q } ^ { ( k ) } - \omega _ { \mathbf r } + ( j - 1 ) \delta _ { \mathbf k } } \ ( 4 )$$

where 𝜔୯ (௞) is the bare transition frequency associated with qubit 𝑘 𝑔௞ , is the coupling strength between transmon 𝑘 and the connected resonator, and 𝜔୰ represents  the  frequency  of  the  coupled resonator.  The  last  term  in  Eq.  4  is  repeated  for each transmon with appropriate modifications depending on the number of coupled resonators.

For any pair of coupled transmons via a resonator, we estimate the direct coupling between two transmons (𝑘, 𝑘 + 1) as:

$$\begin{array} { c } \pi \\ \mathfrak { e }. \\ \mathfrak { e } \\ \mathfrak { e } \end{array} \begin{array} { c } \widetilde { \mathcal { H } } _ { c } ^ { ( k, k + 1 ) } = \\ \mathfrak { e } \\ \mathfrak { e } \\ \mathfrak { s } \\ \mathfrak { r } \end{array} \begin{array} { c } \Sigma _ { j _ { k }, j _ { k + 1 } } \sqrt { j _ { k } + 1 } \sqrt { j _ { k + 1 } + 1 } J _ { j _ { k }, j _ { k + 1 } } ( | j _ { k }, j _ { k + 1 } + \\ 1 \rangle \langle j _ { k } + 1, j _ { k + 1 } | + | j _ { k } + 1, j _ { k + 1 } \rangle \langle j _ { k }, j _ { k + 1 } + 1 | ) \end{array} ( 5 )$$

where 𝐽 ௝ ౡ ,௝ ౡశభ is the direct coupling between level 𝑗 ୩ from  the 𝑘 ୲୦ transmon  and  level 𝑗 ୩ାଵ from  the (𝑘 + 1) ୲୦ transmon.

$$J _ { j _ { k }, j _ { k + 1 } } = \\ \frac { g _ { k } g _ { k + 1 } \left ( \omega _ { q } ^ { ( k ) } + \delta _ { k } j _ { k } - \omega _ { r } + \omega _ { q } ^ { ( k + 1 ) } + \delta _ { k + 1 } j _ { k + 1 } - \omega _ { r } \right ) } { 2 \left ( \omega _ { q } ^ { ( k ) } + \delta _ { k } j _ { k } - \omega _ { r } \right ) \left ( \omega _ { q } ^ { ( k + 1 ) } + \delta _ { k + 1 } j _ { k + 1 } - \omega _ { r } \right ) }$$

where 𝛿୩ and 𝛿୩ାଵ are  the  anharmonicity  values associated with transmons 𝑘 and 𝑘 + 1 , respectively.

Using  the  time-dependent  Hamiltonian  of  the system, the time evolution equation of the system is solved to achieve the unitary transformation 𝑈 :

$$U ( t ) = \exp \left \{ - \frac { i } { h } \int _ { 0 } ^ { t } \mathcal { H } ( \tau ) \, d \tau \right \}$$

Here 𝑡 is  the  time, ℋ is  the  Hamiltonian  of  the system, and ℏ is the reduced Planck's constant. To solve Eq. 7, we employ Trotterization [27]. Hence, the  final  unitary  transformation  is  estimated  as follows [28]:

$$U ( t _ { k } ) = U _ { k } U _ { k - 1 } U _ { k - 2 } \dots \, U _ { 2 } U _ { 1 } U _ { 0 } \, \text{ \quad \ \ } ( 8 )$$

Here 𝑈௜ for 𝑖 = {0, 1, … , 𝑘} is calculated using Eq. 7  for  the  newly  time-independent  Hamiltonian  at each  timestep 𝑖 ,  where 𝑈଴ = 𝐼 ,  and 𝑘 is  the  total number  of  steps.  The  Trotter  step  size  is 𝑇/𝑘 ,

where 𝑇 is the gate evolution time. In our simulations, the Trotter step size was 100 ps.

When solving the time evolution equation, we considered a smaller subspace to reduce the computational  expenses.  The  Hamiltonian  for 𝑛 transmons  with  four  energy  levels  spans  a 4 ௡ -dimensional Hilbert space. For a system composed of  three  transmons  ( 𝑛 = 3 )  the  Hamiltonian  is  a 64 × 64 matrix operator. Solving the Schrödinger equation for this large operator is computationally expensive,  and  there  are  numerous  energy  levels that have a minimal impact on the evolution for the gate of interest. Thus, we  project this larger Hamiltonian to a smaller subspace where at most three excitations are allowed, resulting in a 20 × 20 matrix [18]. The 20 states considered are { |000〉 , |001〉 , |002〉 , |003〉 , |010〉 , |011〉 , |012〉 , |020〉 , |021〉 , |030〉 , |100〉 , |101〉 , |102〉 , |110〉 , |111〉 , |120〉 , |200〉 , |201〉  |210〉 , , |300〉 }.

The reduced Hamiltonian  is evolved based on the qubit transition frequencies. The  resulting unitary is projected [18] to the 8 × 8 computational subspace  that  includes  the  states  { |000〉 , |001〉 , |010〉 , |011〉 , |100〉 , |101〉 , |110〉 , |111〉 }. Singlequbit phase compensation [14], [17-18] is performed  on  this resultant unitary using the diagonal compensation matrix

$$M & = \\ e ^ { - i \theta _ { 0 } } \, \text{diag} ( 1, e ^ { - i \theta _ { 1 } }, e ^ { - i \theta _ { 2 } }, e ^ { - i ( \theta _ { 1 } + \theta _ { 2 } ) }, e ^ { - i \theta _ { 4 } }, \\ & \quad e ^ { - i ( \theta _ { 1 } + \theta _ { 4 } ) }, e ^ { - i ( \theta _ { 2 } + \theta _ { 4 } ) }, e ^ { - i ( \theta _ { 1 } + \theta _ { 2 } + \theta _ { 4 } ) } ) \quad ( 9 ) \quad \text{the} \quad \text{sea}$$

where 𝜃଴ represents the global phase, and 𝜃ଵ , 𝜃ଶ , and 𝜃ସ represent the relative single qubit phases of states |001〉 , |010〉 , and |100〉 , respectively.

The  single  qubit  phases  are  cancelled  out  by multiplying matrix 𝑀 with the projected unitary in the computational subspace:

$$U _ { \text{final} } = U _ { \text{proj} } \times M & & ( 1 0 ) & & \nu$$

Finally, we calculate the gate fidelity considering unitarity 𝑈୤୧୬ୟ୪ and its closeness to the target ideal operation from Eq. 1 as follows [29]:

$$\mathcal { F } = \frac { \text{Tr} ( U ^ { \dagger } U ) + \left | \text{Tr} \left ( U _ { \text{ideal} } ^ { \dagger } U \right ) \right | ^ { 2 } } { d ( d + 1 ) } & & ( 1 1 ) & & \stackrel { \Re } { c c }$$

where 𝑑 = 2 ଷ is the dimensionality of the computational subspace.

## IV. CCPhase gate design using machine learning methods

There are many machine learning and optimization  algorithms  one  can  choose  to  solve the optimal control problem. We design the system parameters to realize the CCPhase gate by combining two learning  methods:  (1) A  machine learning  method  based  on  differential  evolution [30] named Subspace-Selective Self-Adaptive Differential  Evolution  (SUSSADE)  [17-18],  (2) our  new  local  search  algorithm.  In  both  learning procedures, the gate fidelity as shown in Eq. 11 is considered  as  the  fitness  function  to  achieve  the optimal  control  parameters  for  the  given  ideal unitary. During the learning procedure all parameters  are  assumed  to  be  fixed,  except  the frequency detuning sequences of transmons.

In our simulations, the resonator-transmon couplings are set to 𝑔 = 0.2 GHz , and anharmonicity of each transmon was 𝛿 = -0.3 GHz . The  three transmons  (labeled  Left, Middle, Right) with reference transition frequencies  set  to  5,  6,  and  7  GHz,  realize  an identity operation with fidelity 99.9%. Transmons L and M are coupled with a 8.05 GHz resonator, and transmons M and R are coupled with a 8.2 GHz resonator.

To reduce the search space during the learning procedure, the  reference  transition frequencies  of the qubits are set closer during the ML algorithms search; 𝑓 ୐ = 5.61 GHz , 𝑓 ୑ = 6 GHz , and 𝑓 ୖ = 6.39 GHz ,  repectively.  The  maximum  frequency detuning ranges permitted from the reference frequency of each qubit  are set to [0,  0.5),  (-0.5, 0.5), and  (-0.5, 0], for qubits L, M,  and  R, respectively. These constraints help further reduce the  search  space  and  increase  efficiency  of  the learning  process  by  removing  trial  of  detuning values far away from the interaction region.

Note, we further impose the following constraints during learning to ensure that the optimal frequency detuning sequences are experimentally  realistic  and  achievable,  and  that the target gate is robust. We  enforce these constraints by:

- 1. Limiting the maximum  point-topoint  variation  of  the  frequency  detuning sequence  of  each  qubit  to  220  MHz  to prevent undesired excitations in the quantum system. To take into account the

limitations of physical signal instrumentation  [31],  the  initial  and  the final points are limited to maximum pointto-point  variation  of  500  MHz  from  the initial reference transition frequencies of 5, 6, and 7 GHz.

- 2. Limiting  the  minimum  difference between transition frequencies of two adjacent  qubits  to 0.21 GHz ;  primarily  to prevent interactions within the singleexcitation manifold.

Here  we  briefly  describe  how  the  SUSSADE algorithm [17-18] was used to generate the qubit transition detuning sequences. First a random population  of  200  random  frequency  detuning sequences  (chromosomes)  is  generated  in  which each  sequence  contains  150  frequencies  (50  per qubit). For a gate timing of 𝑇 = 50 ns , the detuning sequence of each qubit is discretized to 50 amplitudes.

After generating the initial population, we perform  SUSSADE  by  randomly  modifying  the values of detuning sequences using the differential evolution operations such as mutation, crossover, and selection [18], [30]. Finally, the fidelity of the resulting  final  unitary  is  calculated  using  Eq.  11. For  any  modified  detuning  sequence,  if  the  new fidelity value is larger than the initial one, the new detuning sequence survives to the next generation. This procedure repeats until we reach our choice of fidelity  threshold  value  (99.99%)  or  maximum number of iterations (one million cycles). We use the  Message  Passing  Interface  to  distribute  the simulation to 200 nodes on a computer cluster [32] such that each node is performing a full cycle of solving the time evolution and fidelity calculation for each member of the population.

SUSSADE was successfully used to obtain the frequency detuning sequences for a 50 ns CCPhase gate with fidelity of 98.8%, but any further progress was slow. Thus, a local search algorithm was implemented to refine the detuning sequences and achieve a gate fidelity of 99.99%. Note that the local search algorithm is efficient once the search space has been reduced by other learning algorithms.

The  local search algorithm  consists of the following steps:

- 1In  the  beginning  of  the  learning process, we define the largest (100 MHz) and

the smallest  (1  KHz)  change  in  frequency detuning allowed per data point. This is referred to as the optimization step size 𝜖 . We also  set  the  maximum  number  of  iterations (1000),  the  desired  fidelity  (99.99%),  and  all constraints enforced during SUSSADE.

- 2While  the  constraints  are  met  and the  desired  fidelity  or  maximum  number  of iterations have not been reached, the following procedure is repeated:
- a) A  local  search  window  is  moved from the first data point toward the last data point.
- b) At  each  window,  we  recursively vary  the  frequency  detuning  value  up  or down by the optimization step size 𝜖 as long as it keeps improving the gate fidelity.
- c) Once the local  search  window has covered  all  data  points  of  the  detuning sequence  of  all  qubits,  we  reduce 𝜖 for  a finer grain optimization ( 𝜖୬ୣ୵ = 0.1𝜖୭୪ୢ ).
- d) If the optimization is already completed  for  the  smallest  predefined 𝜖 during the iteration, we increase the iteration  number  by  one,  reset 𝜖 to  the largest  predefined  value,  and  repeat  from step a.

The CCPhase gate duration is set to 50 ns for evaluation, and the learning algorithms operate on 1 ns step size. However, time evolution is in Trotter steps of size 100 ps (k=500 in Eq. 8). The learned frequency  detuning  sequences  are  kept  constant during each 1 ns step to obtain piecewise-constant pulse forms as shown in Fig. 2.

## V. Gate verification and impact of decoherence

Simulated quantum process tomography (QPT) was used to independently evaluate gate performance by using master equation simulations. QPT is an excellent tool to evaluate the dynamics of a quantum system due to any process [33], in this case  the  CCPhase  gate.  Given  that  this  is  QPT within simulation, state preparation and measurement errors do not affect the methodology. Hence  the  results  from  QPT  enable  us  to  fully characterize the introduced gate.

FIG. 2. (Color  online) The learned transition frequency detuning sequences of the right, middle, and left qubits are shown  from  top  to  bottom  respectively.  The  piecewise constant  forms  are  generated  from  the  learned  frequency detuning sequences (50 learned data points per each transmon).

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01092v1-figure-93120445-d2c0-42e5-8809-ef95b40c8b1c.jpg)

Initial verification was performed assuming no decoherence  in  the  system  by  using  the  Von Neumann equation for time evolution:

$$i \hbar { \frac { \partial \rho } { \partial t } } & = \mathcal { H } \rho - \rho \mathcal { H }, & ( 1 2 ) & \quad \int _ { [ 4 ] } ^ { \infty }$$

where the Hamiltonian ℋ is the same as that given in Eq. 2 with the number of levels in each transmon set to 𝑗 ୫ୟ୶ = 4 , and 𝜌 is the density matrix for the three transmon system.

The three transmon system was evolved using the generated resonance frequency detuning sequences from learning algorithms. The evolution was  performed  on  all  the  initial  states  given  by ൛𝐼, 𝑅 ௫ ଴.ହగ , 𝑅 ௬ ଴.ହగ , 𝑅 ௫ గ ൟ ⊗ଷ |000〉 resulting in 64 density matrices.  Unlike  experimental  QPT,  it  was  not necessary to perform quantum state tomography to reconstruct  these  density  matrices  for  the  final states. These results were used to perform QPT by imposing constraints that the process matrix 𝜒 must satisfy [34-35]. The 𝜒 matrix completely characterizes the underlying process and is positive-Hermitian by definition [33].

We use the following metrics as defined in Ref. [34] to evaluate the performance of the CCPhase gate:

$$\text{Process fidelity} \colon \mathcal { F } _ { p } = \text{Tr} \left ( \chi ^ { ( \text{ideal} ) } \chi \right ) \quad ( 1 3 ) \quad \frac { z } { \sqrt { \pi } }$$

$$\text{Average gate fidelity} \colon \mathcal { F } _ { g } = \frac { d \mathcal { F } _ { p } + 1 } { d + 1 } \quad \quad ( 1 4 ) \quad \ \text{$t_{1}$}$$

$$\text{Average purity} \colon \overline { \text{Tr} ( \rho ^ { 2 } ) } = \frac { d \text{ Tr} ( \chi ^ { 2 } ) + 1 } { d + 1 } \quad \text{ (15)} \quad \text{ a}$$

where 𝜒 is the experimentally determined process matrix, 𝜒 (୧ୢୣୟ୪) is  the ideal process matrix for the CCPhase gate, and 𝑑 = 2 ଷ is the dimensionality of the  computational  subspace  of  the  system.  The results from evaluation are given in TABLE I.

TABLE I. Table of QPT metrices for simulations under different conditions

| Conditions                     |   𝓕 𝐩 |   𝓕 𝐠 |   𝐓𝐫(𝝆 𝟐 ) തതതതതതത തത |
|--------------------------------|-------|-------|-----------------------|
| 𝑘 ୫ୟ୶ = 4 , 𝑇 ଵ = 𝑇 ଶ = ∞      | 0.999 | 0.999 |                 0.999 |
| 𝑘 ୫ୟ୶ = 3 , 𝑇 ଵ = 𝑇 ଶ = ∞      | 0.998 | 0.998 |                 0.999 |
| 𝑘 ୫ୟ୶ = 4 , 𝑇 ଵ = 𝑇 ଶ = 20 μ s | 0.995 | 0.995 |                 0.991 |
| 𝑘 ୫ୟ୶ = 3 , 𝑇 ଵ = 𝑇 ଶ = 20 μ s | 0.993 | 0.994 |                 0.991 |

The simulations incorporating decoherence were performed  using  the  Lindblad-Kossakowski form of the master equation [36-37]. The appropriate operators for the dephasing portion of the master equation were obtained as in Refs. [3839]. For convenience in simulation, 𝑇ଵ and 𝑇ଶ were both set to 20 μs , assuming  coherence  times independent  of  the  flux-tuning  of  the  transmons [40]. Please refer to supplementary material for the full process matrices resulting from QPT. Comparison of results for 𝑘୫ୟ୶ = 3 ({|0〉, |1〉, |2〉} levels) and 𝑘୫ୟ୶ = 4 ( {|0〉, |1〉, |2〉, |3〉} levels) from  Table  I  indicates  that  the  fourth  level  ( |3〉 ) also plays a limited role in the system evolution.

## VI. Robustness evaluation

The frequency detuning sequences derived from the learning algorithms have a piecewise-constant form. To investigate the effect of first-order distortion  due  to  control  electronics,  we  use  the following  pulse  reshaping  method  [14],  [18]  to smooth the frequency detuning sequences:

$$\begin{smallmatrix} \bullet y \\ \text{st} \\ \text{ly} \\ \text{is} \end{smallmatrix} \quad \begin{smallmatrix} \omega _ { k } ( t ) = \frac { \omega _ { k _ { i } } + \omega _ { k _ { i + 1 } } } { 2 } + \\ \frac { \omega _ { k _ { i + 1 } } - \omega _ { k _ { i } } } { 2 } \left [ \text{Erf} \left ( \frac { t - \left ( \frac { t _ { \text{tramp} } } { 2 } \right ) } { \sqrt { 2 } \sigma } \right ) \right ], \end{smallmatrix}$$

where 𝜔௞ (𝑡) represents  the  distorted  frequency detuning  of  qubit 𝑘 during 𝑡 ௜ ≤ 𝑡 ≤ 𝑡௜ାଵ ,  and 𝑡 ௜ represents the 𝑖 th time step. Here Erf(𝑡) ≡ ଶ √𝜋 ∫ 𝑒 -𝑥 2 𝑑𝑥 𝑡 0 is the  error  function  value  of 𝑡 , 𝑡 ୰ୟ୫୮ = 1 ns ,  and 𝜎 = ௧ ౨౗ౣ౦ ସ√ଶ [14].  The  distorted sequences are shown in Fig. 3 (a), and we observed a  fidelity  reduction  of  1.21%,  which  resulted  in average fidelity of 98.79%.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01092v1-figure-fc9f5243-d314-4758-9102-7d4f64a48303.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.01092v1-figure-769772ea-35bd-4213-8036-f76b5cf463c9.jpg)

(b)

FIG.  3. (Color  online)  The  effect  of  distortion  and random  noise  on  the  learned  transition  frequency  detuning sequences. (a) The smoothed transition  frequency  detuning sequences of the right, middle, and left qubits are shown from top  to  bottom  respectively.  (b) The  CCPhase  gate  average fidelity over 10000 samples under the effect of random noise with amplitudes ranging in 0 to 10 MHz.

To investigate the effect of random noise on the CCPhase gate, we plot the average fidelity while increasing the random noise with amplitudes varying  from  0  to  10  MHz.  For  each  amplitude value, random noise is  generated from a uniform distribution (-1, 1) , multiplied by the noise amplitude  and  added  to  the  optimized  detuning sequence. The latter step is repeated 10000 times and  at  each  iteration  the  system  Hamiltonian  is evolved,  and  the  gate  fidelity  is  calculated.  The averaged fidelity of the 10000 results is reported as the average fidelity at each noise amplitude. Fig. 3 (b)  illustrates  the  gate  robustness  against  random noise and demonstrates fidelity &gt;99% with random noise amplitudes of up to 6.7 MHz.

## VII. Conclusion

We designed a robust CCPhase entangling gate with  fidelity  &gt;99.99%  and  duration  of  50  ns  for quantum  systems  of  nearest  neighbor  transmons coupled via resonators. We describe the gate design procedure using simulation and machine learning techniques and present a new local search algorithm for optimal quantum control applicable to small search spaces. The  operation  of the CCPhase gate is confirmed by a simulator in C++ that solves the Schrödinger equation for the time- dependent Hamiltonian of the system. Moreover, the  gate  operation  is  verified  independently  via quantum process tomography in both the presence and  absence  of  decoherence.  Gate  robustness  is examined using random noise injection and frequency detuning distortion. The presented theoretical gate design procedure, verification, and robustness  investigation can  be  applied  to  design new gates for other quantum systems as well.

## References

- 1. A. Blais, R. S. Huang, A. Wallraff, S.M. Girvin, R. J. Schoelkopf, "Cavity quantum electrodynamics for superconducting electrical circuits: An architecture for quantum computation", Phys. Rev. A 69, 062320, 2004.
- 2. A. Wallraff, D. I. Schuster, A. Blais, L. Frunzio, R.S. Huang, J. Majer, S. Kumar, S. M. Girvin &amp; R. J. Schoelkopf , "Strong coupling of a single photon to a superconducting qubit using circuit quantum electrodynamics",  Nature  431,  162167, 2004.
- 3. A. Blais, J. Gambetta, A. Wallraff, D. I. Schuster, S. M. Girvin, M. H. Devoret, and R. J. Schoelkopf, "Quantum-information  processing  with  circuit quantum  electrodynamics",  Phys.  Rev.  A  75, 032329 - Published 22 March 2007, 2007.
- 4. J. Koch, T. M. Yu, J. Gambetta, A. A. Houck, D. I. Schuster, J. Majer, A. Blais, M. H. Devoret, S. M. Girvin,  R.  J.  Schoelkopf  ,  "Charge-insensitive qubit design derived from the Cooper pair box", Phys. Rev. A 76, 042319 (2007).," Phys. Rev. A 76, 042319, 2007.
- 5. R.  Barends,  J.  Kelly,  A.  Megrant,  D.  Sank,  E. Jeffrey, Y. Chen, Y. Yin, B. Chiaro, J. Mutus, C. Neill, P. O'Malley, P. Roushan, J. Wenner, T. C. White,  A.  N.  Cleland,  and  John  M.  Martinis, "Coherent Josephson Qubit Suitable for Scalable  Quantum  Integrated  Circuits",  Phys. Rev. Lett. 111, 080502 (2013).," Phys. Rev. Lett. 111, 080502, 2013.
- 6. J. M.  Gambetta,  J.  M.  Chow,  J.  M.  Steffen, "Building  logical  qubits  in  a  superconducting quantum computing system", npj Quantum Inf. 3, 2, 2017.
- 7. H. Paik, D. I. Schuster, L. S. Bishop, G. Kirchmair, G.  Catelani,  A.  P.  Sears,  B.  R.  Johnson,  M.  J. Reagor, L. Frunzio, L. I. Glazman, S. M. Girvin, M. H.  Devoret,  R.  J.  Schoelkopf,  "Observation  of High  Coherence  in  Josephson  Junction  Qubits Measured in a Three-Dimensional Circuit QED Architecture",  Phys.  Rev.  Lett.  107,  240501, 2011.

- 8. J. Preskil, "Quantum Error Correction," Physics 219, lecture notes chapter 7, Caltech, http://theory.caltech.edu/people/preskill/ph2 29/notes/chap7.pdf.
- 9. B.  M.  Terhal,  "Quantum  Error  Correction  for Quantum Memories", Rev. Mod. Phys. 87, 307 - Published 7 April 2015., 2015.
- 10. R. Versluis, S. Poletto, N. Khammassi, N. Haider, D. J. Michalak, A. Bruno, K. Bertels, L. DiCarlo, "Scalable  Quantum  Circuit  and  Control  for  a Superconducting Surface Code", 10.1103/PhysRevApplied.8.034021.
- 11. L. DiCarlo, J. M. Chow, J. M. Gambetta, Lev S. Bishop, B. R. Johnson, D. I. Schuster, J. Majer, A. Blais, L. Frunzio, S. M. Girvin, R. J. Schoelkopf, "Demonstration of two-qubit algorithms with a superconducting  quantum  processor",  Nature 460, 240-244 (2009)., 2009.
- 12. F. W. Strauch, Ph. R. Johnson, A. J. Dragt, C. J. Lobb,  J.  R.  Anderson,  and  F.  C.  Wellstood, "Quantum Logic Gates for Coupled Superconducting Phase Qubits", Phys. Rev. Lett. 91, 167005, 2003.
- 13. R.  Barends  et.  al.,  "Superconducting  quantum circuits at the surface code threshold for fault tolerance", Nature 508, 500-503, 2014.
- 14. J. Ghosh, A. Galiautdinov, Z. Zhou, A. N. Korotkov,  J.  M.  Martinis,  and  M.  R.  Geller, "High-fidelity controlled-σ Z gate for resonatorbased  superconducting  quantum  computers", Phys. Rev. A.87.022309, 2013.
- 15. M.  D.  Reed,  L.  DiCarlo,  S.  E.  Nigg,  L.  Sun,  L. Frunzio, S. M. Girvin &amp; R. J. Schoelkopf, "Realization of three-qubit quantum error correction with superconducting circuits", Nature. 2012 10.1038/nature10786, 2012.
- 16. A. Fedorov, L. Steffen, M. Baur, M. P. da Silva, A.  Wallraff,  "Implementation  of  a  Toffoli  gate with  superconducting  circuits",  Nature.  2011 10.1038/nature10713, 2011.
- 17. E. Zahedinejad, J. Ghosh, B. C. Sanders , "HighFidelity  Single-Shot  Toffoli  Gate  via  Quantum Control", 10.1103/ PhysRevLett. 114.200502.
- 18. E. Zahedinejad, J. Ghosh, B. C. Sanders, "Designing High-Fidelity Single-Shot ThreeQubit  Gates:  A  Machine-Learning  Approach", 10.1103/PhysRevApplied.6.054005.
- 19. M. H. Goerz, F. Motzoi, K. B. Whaley, C. P. Koch, "Charting  the  circuit  QED  design  landscape using  optimal  control  theory",  npj  Quantum Information (2017) 3:37 ; doi:10.1038/s41534017-0036-0, 2017.
- 20. R. J. Spiteri, M. Schmidt, J. Ghosh, E. Zahedinejad,  and  B.  C.  Sanders,  "Quantum
- control for high-fidelity multi-qubit gates," 2018 New J. Phys. 20 113009, 2018.
- 21. S. Machnes,  U.  Sander,  S.J. Glaser, P. de Fouquières,  A.  Gruslys,  S.  Schirmer,  and  T. Schulte-Herbrüggen,  "Comparing,  optimizing, and benchmarking quantum-control algorithms in a unifying programming framework", 10.1103/PhysRevA.84.022305 (2011), 2011.
- 22. N.  Khaneja,  T.  Reiss,  C.  Kehlet,  T.  SchulteHerbrüggen, and S.  J.  Glaser,  J.  Magn.  Reson, "Optimal  control  of  coupled  spin  dynamics: design  of  NMR  pulse  sequences  by  gradient ascent algorithms", https://doi.org/10.1016/j.jmr.2004.11.004, 2004.
- 23. N.  Rach,  M.  M.  Müller,  T.  Calarco,  and  S. Montangero,  "Dressing  the  chopped-randombasis optimization: A bandwidth-limited access to  the  trap-free  landscape",  Phys.  Rev.  A.  92, 062343 (2015).
- doi:10.1103/PhysRevA.92.062343, 2015.
- 24. V. V. Shende, I. L. Markov, "On the CNOT-cost of TOFFOLI gates", Vols. Volume 9 Issue 5, May 2009 Pages 461-486.
- 25. A.  Barenco,  C.  H.  Bennett,  R.  Cleve,  D.  P. DiVincenzo,N. Margolus,P. Shor, T. Sleator, J. A. Smolin, and H. Weinfurter, "Elementary gates for quantum computation", PHYSICAL REVIEW A VOLUME 52, NUMBER 5, 1995.
- 26. S. Richer, "Perturbative analysis of two-qubit gates on Transmon qubits", Masters thesis, RWTH Aachen Univer, 2013.
- 27. N.  Hatano,  M.  Suzuki,  "Finding  Exponential Product Formulas of Higher Orders," In: Das A., K. Chakrabarti B. (eds) Quantum Annealing and Other Optimization Methods. Lecture Notes in Physics,  vol  679.  Springer,  Berlin,  Heidelberg, 2005.
- 28. M.  H.  Yung,  J.  D.  Whitfield,  S.  Boixo,  D.  G. Tempel, A. Aspuru-Guzik, "Introduction to Quantum Algorithms for Physics and Chemistry", Quantum Physics (quantph);Mesoscale and Nanoscale Physics, Advances in Chemical Physics Volume 154 (ed S. Kais), John Wiley &amp; Sons, Inc., Hoboken, New Jersey (2014), 10., 2014.
- 29. L.  H. Pedersen,  K.  Molmer,  N.  M.Moller,  , "Fidelity of quantum operations", Phys Lett. A, 367, 47 (2007), 2007.
- 30. R.  Storn,  K.  Price,  "Differential  Evolution  -  A Simple and Efficient Heuristic for global Optimization over Continuous Spaces", Journal of Global Optimization (1997) 11: 341.

https://doi.org/10.1023/A:1008202821328, 1997.

- 31. M.  A.  Rol,  F.  Battistel,  F.  K.  Malinowski,  C.  C. Bultink, B. M. Tarasinski, R. Vollmer, N. Haider, N. Muthusubramanian, A. Bruno, B. M. Terhal, and L. DiCarlo, "A fast, low-leakage, high-fidelity two-qubit gate for a programmable superconducting quantum computer", arXiv:1903.02492v1 , March 2019.
- 32. "Coeus Cluster," [Online]. Available: http://www.pi4cs.org/equipment.
- 33. M. A. Nielsen, I.L. Chuang, "Quantum Computation and Quantum Information", CambridgeUniversity Press, Cambridge, 2001.
- 34. J.  L.  O'Brien,  G.  J.  Pryde,  A.  Gilchrist,  D.  F.  V. James, N. K. Langford, T. C. Ralph, A. G. White, "Quantum Process Tomography of a Controlled-NOT Gate", Phys. Rev. Lett., vol. 93, no. 8, p. 080502, Aug. 2004, 2004.
- 35. S. P. Premaratne, J. H. Yeh, F. C. Wellstood, B. S. Palmer, "Implementation of a generalized controlled-NOT  gate  between  fixed-frequency transmons",  Phys.  Rev.  A,  vol.  99,  no.  1,  p. 012317, Jan. 2019, 2019.
- 36. G.  Lindblad,  "On  the  generators  of  quantum dynamical semigroups", Commun. Math. Phys., vol. 48, no. 2, pp. 119-130, Jun. 1976, 1976.
- 37. A. Kossakowski, "On quantum statistical mechanics of non-Hamiltonian systems Reports",  Math. Phys.,  vol. 3,  no.  4,  pp.  247274, Dec. 1972, 1972.
- 38. G.  Jaeger,  and  K.  Ann,  "Disentanglement  and decoherence in a pair of qutrits under dephasing noise", J. Mod. Opt., vol. 54, no. 1617, pp. 2327-2338, 2007, 2007.
- 39. Y. Yang, andA. M. Wang, "Quantum discord for a  qutrit-qutrit  system  under  depolarizing  and dephasing noise", Chinese Phys. Lett., vol. 30, no. 8, 2013, 2013.
- 40. M. D. Hutchings, Jared B. Hertzberg, Yebin Liu, Nicholas T.  Bronn,  George  A.  Keefe,  M.  Blink, Jerry M.  Chow,  B.  L.  T.  Plourde,  "Tunable Superconducting Qubits with Flux-Independent Coherence", Phys. Rev. Appl., vol. 8, no. 4,  p. 044003, Oct. 2017, 2017.

## Acknowledgements

This  work  was  made  possible  in  part  thanks  to Portland  Institute  for  Computational  Science  and  its resources  acquired  using  NSF  Grant  #  DMS  1624776 and ARO Grant #W911NF-16-1-0307 .

## Author contributions

S.  D.  conceived  the  project,  implemented  a quantum simulator for gate design  purpose using the  learning  algorithms  and  to  verify  the  gate operation,  and  investigated  the  robustness  of  the gate  under  distortion  and  random  noise.  S.  P. verified the gate operation using QPT and investigated the effect of decoherence on the gate. S.D.  and  S.P.  wrote  the  manuscript.  All  authors commented on the manuscript.  A. M.  supervised the project.
Sahar Daraeizadeh Shavindra P. Premaratne Xiaoyu Song Marek Perkowski Anne Y. Matsuura
Machine-learning based three-qubit gate for realization of a Toffoli gate with cQED-based transmon systems
We use machine learning techniques to design a 50 ns three-qubit flux-tunable
controlled-controlled-phase gate with fidelity of >99.99% for nearest-neighbor
coupled transmons in circuit quantum electrodynamics architectures. We explain
our gate design procedure where we enforce realistic constraints, and analyze
the new gate's robustness under decoherence, distortion, and random noise. Our
controlled-controlled-phase gate in combination with two single-qubit gates
realizes a Toffoli gate which is widely used in quantum circuits, logic
synthesis, quantum error correction, and quantum games.