alphaFeedback

WorksPhysics and Astronomy

High-fidelity quantum gate learning via physics-informed neural networks

AI contributions
Not recorded for this paper
View details

Abstract

We propose a physics-informed neural network (PINN) approach for high-fidelity quantum gate learning in both one- and two-qubit systems. We train a PINN using the time-dependent Schrödinger equation, where smooth control fields with fixed boundary conditions are obtained by minimizing a loss function that considers model dynamics, gate error, physical constraints, regularization terms, and multiple initial conditions. Training considers pairs of mutually unbiased bases, while independent validation combines Haar-random input states with the average gate fidelity. Unitary simulations yield an average gate infidelity of 8.49×10−88.49\times10^{-8} for Hadamard and values between 3.39×10−73.39\times10^{-7} and 4.96×10−64.96\times10^{-6} for controlled-NOT under XXXX, YYYY, and ZZZZ interactions. We examine how the learned control fields depend on the coupling, training configuration, and available local fields, including five exchange-type dipolar scenarios. We test the learned control fields under the Lindblad master equation with dephasing and amplitude damping, theoretically reproducing the expected first-order fidelity loss in the weak-dissipation regime. Finally, boundary-adapted Chebyshev expansions represent 139 learned controls with a minimum common count of K∗=24K_\ast=24 coefficients per control for all eleven family-averaged mean squared errors to fall below 10−610^{-6}. Separately, square-pulse and Strang propagation at K=30K=30 preserve all 31 continuous polynomial references within infidelity 10−510^{-5} at N=128N=128 and all larger tested resolutions, under both sampling rules. These results connect multi-state gate synthesis, control-resource characterization, and compact square-pulse playback.

Introduction

Performing high-fidelity quantum gates is a critical challenge in developing practical, fault-tolerant quantum computers. Single- and two-qubit gates are the fundamental building blocks of quantum circuits, and their fidelity directly impacts the viability of quantum algorithms. Achieving high gate fidelities requires careful control-pulse optimization, motivating methods for optimal gate synthesis and numerical control design [1, 2]. The fundamental obstacle is navigating the high-dimensional control landscape while satisfying multiple objectives: maximizing gate fidelity, minimizing gate time, and ensuring robustness to experimental noise and parameter uncertainties. In most quantum platforms, including superconducting circuits, ion traps, and neutral atom systems, quantum gates are generated through carefully engineered time-dependent control Hamiltonians.

Designing these control functions remains a central challenge in quantum technologies because they must satisfy diverse physical constraints, including bounded amplitudes, limited bandwidth, robustness against decoherence, and resilience to experimental imperfections. Traditional quantum optimal control methods, such as GRAPE and CRAB [3, 4], have achieved remarkable success; however, they typically require repeated numerical optimization for each target gate and experimental configuration, which becomes computationally expensive and difficult to scale [5]. In this context, physics-informed neural networks (PINNs) offer a promising alternative by embedding the governing quantum dynamics directly into the training process, allowing neural networks to parameterize continuous state trajectories and control functions [6, 7].

PINNs were originally introduced as a framework to solve forward, inverse, and nonlinear problems governed by partial differential equations by incorporating physical laws into the loss function of deep neural networks [6]. Since then, researchers have successfully applied PINNs across a broad spectrum of scientific disciplines, including fluid mechanics, materials science, engineering, and biology [7, 8, 9, 10]. The key innovation of PINNs is their ability to encode physical laws directly into the loss function during neural network training, constraining the network to learn solutions consistent with underlying physics rather than relying solely on data fitting. Over the past few years, neural network-based approaches have demonstrated strong potential in quantum control, where machine learning models are trained to generate control pulses that steer quantum systems toward desired states or unitary operations [11, 12, 13, 14]. In particular, Ref. [11] introduced a PINN-based scheme for obtaining smooth, noise-robust control pulses for unitary dynamics by directly minimizing sensitivity to quasistatic noise, without averaging over noise realizations. Reference [12] demonstrated PINN-based two-qubit gate design for an isotropic Heisenberg model using process-fidelity objectives evaluated from propagated quantum channels under Schrödinger and Lindblad dynamics.

In this work, we build on the framework of Ref. [13] to

Quantum system and logical gates

In this section, we introduce the physical models used to train the PINN and the target quantum logic gates. In particular, we introduce the problem of implementing the Hadamard and Controlled-NOT gates in terms of the unitary dynamics encoded in the time-dependent Schrödinger equation, where control fields are the target functions to realize the quantum control task.

Theoretical model for one- and two-qubit quantum dynamics

In quantum mechanics, the dynamics of isolated systems is described by a unitary evolution. For a vector state in a dd-dimensional Hilbert space, ∣ψ(t)⟩∈H(d)|\psi(t)\rangle\in\mathcal{H}^{(d)}, the Schrödinger equation reads (ℏ=1\hbar= 1)

ddt∣ψ(t)⟩=−iH(t)∣ψ(t)⟩,(1)\frac{d}{dt}|\psi(t)\rangle= -iH(t)|\psi(t)\rangle, \tag*{(1)}

or, equivalently, in terms of the unitary propagator U(t)U(t) which satisfies U˙(t)=−iH(t)U(t)\dot{U}(t) = -iH(t)U(t) with the initial condition U(0)=1U(0) = 1, where the Hamiltonian H(t)=H0+∑αHα(t)H(t) = H_0 + \sum_{\alpha} H_{\alpha}(t) is usually split into a bare (time-independent) and a time-dependent part. The dynamics of a single qubit can be described by using the Pauli operators σ=(σx,σy,σz)\boldsymbol{\sigma} = (\sigma_x,\sigma_y,\sigma_z), which, together with the identity operator, form a complete operator basis on H(2)\mathcal{H}^{(2)}. In this representation, the Hamiltonian of a driven single-qubit system generally reads

H1(t)=u(t)⋅σ,(2)H_1(t) = \mathbf{u}(t) \cdot\boldsymbol{\sigma}, \tag*{(2)}

where u(t)=(ux(t),uy(t),uz(t))∈R3\mathbf{u}(t) = (u_x(t), u_y(t), u_z(t)) \in\mathbb{R}^3 is a time-dependent control vector describing, for instance, external fields applied along the corresponding Bloch-sphere directions. These controls are typically constrained by physical limitations such as bounded amplitude, finite bandwidth, and smoothness imposed by the experimental devices. Within this framework, arbitrary single-qubit gates can be synthesized by properly shaping the control vector u(t)\mathbf{u}(t). For the sake of implementation of our PINN scheme, we consider a system with a bare Hamiltonian along σz\sigma_z and a transverse control Hamiltonian, such that Eq. (2) reduces to [17]

Hs(t)=−Δσz+ux(t)σx,(3)H_s(t) = -\Delta\sigma_z + u_x(t)\sigma_x, \tag*{(3)}

where Δ\Delta sets the static energy scale of the system, and ux(t)u_x(t) is the unknown control function. For a two-qubit system, the Hilbert space is H(4)=H(2)⊗H(2)\mathcal{H}^{(4)} = \mathcal{H}^{(2)} \otimes\mathcal{H}^{(2)}, and the natural operator basis is given by tensor products of Pauli matrices σα⊗σβ\sigma_\alpha\otimes\sigma_\beta, with α,β∈{0,x,y,z}\alpha,\beta\in\{0,x,y,z\} and σ0=1\sigma_0 = 1. We consider a Hamiltonian with local controls and diagonal qubit-qubit couplings,

H2(t)=∑αJα(σα⊗σα)+∑j=1,2u(j)(t)⋅σ(j),(4)H_2(t) = \sum_{\alpha} J_\alpha\left(\sigma_\alpha\otimes\sigma_\alpha\right) + \sum_{j=1,2} \mathbf{u}^{(j)}(t) \cdot\boldsymbol{\sigma}^{(j)}, \tag*{(4)}

where α∈{x,y,z}\alpha\in\{x,y,z\}, u(j)(t)\mathbf{u}^{(j)}(t) are the local control vectors acting independently on each qubit, and JαJ_\alpha denote the coupling strengths along the three Pauli directions. Here, u(1)(t)⋅σ(1)≡∑lul(1)σl⊗1\mathbf{u}^{(1)}(t) \cdot\boldsymbol{\sigma}^{(1)} \equiv\sum_l u_l^{(1)} \sigma_l \otimes1 and u(2)(t)⋅σ(2)≡1⊗∑lul(2)σl\mathbf{u}^{(2)}(t) \cdot\boldsymbol{\sigma}^{(2)} \equiv1 \otimes\sum_l u_l^{(2)} \sigma_l, with l∈{x,y,z}l \in\{x,y,z\}. The above Hamiltonian is general enough to describe a wide variety of physical platforms, including superconducting qubits with tunable couplers, trapped ions with tunable, phonon-mediated spin-spin interactions, and neutral atom systems interacting via Rydberg blockade mechanisms. The coupling terms enable entanglement generation, which is essential for implementing two-qubit gates such as the controlled-NOT (CX) and controlled-Z gates.

For the systematic analysis presented in this work, we apply the PINN scheme to the Hamiltonian given in Eq. (4) by considering each coupling term separately. Thus, the Hamiltonian to be used in our simulations with two qubits is of the general form

Hk⊗k(t)=Jkσk⊗σk+∑l(ul(1)(t)σl⊗1+ul(2)(t)1⊗σl),(5)H_{k\otimes k}(t) = J_k \sigma_k \otimes\sigma_k + \sum_l \left(u_l^{(1)}(t)\sigma_l \otimes1 + u_l^{(2)}(t)1 \otimes\sigma_l\right), \tag*{(5)}

where k,l∈{x,y,z}k,l \in\{x,y,z\}. For Jk≠0J_k \ne0, the fixed interaction Jk(σk⊗σk)J_k(\sigma_k \otimes\sigma_k), combined with independent local controls, can generate arbitrary single-qubit rotations and is sufficient for universal two-qubit control, including the synthesis of the CX gate [18].

Objective gates: Hadamard and Controlled-NOT

In this section, we briefly introduce the single-qubit Hadamard and the two-qubit CX gates. These two unitary operations are of great value in quantum computing, given that Hadamard allows superposition of quantum states of a qubit, while CX leads to entanglement in multipartite setups. Hence, both are essential to universal quantum computation based on elementary gates.

The Hadamard gate is a single-qubit operation that creates an equal superposition of computational basis states; thus, it is sensitive to phase damping noise, which destroys quantum superposition. In the computational basis {∣0⟩,∣1⟩}\{\lvert0\rangle,\lvert1\rangle\}, Hadamard is defined by the unitary matrix

H=12(111−1),(6)H = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, \tag*{(6)}

which transforms the computational basis states as

H∣0⟩=∣0⟩+∣1⟩2,H∣1⟩=∣0⟩−∣1⟩2.(7)H\lvert0\rangle= \frac{\lvert0\rangle+\lvert1\rangle}{\sqrt{2}}, \qquad H\lvert1\rangle= \frac{\lvert0\rangle-\lvert1\rangle}{\sqrt{2}}. \tag*{(7)}

Physically, the Hadamard gate can be realized by a suitable sequence of rotations around the xx and zz axes of the Bloch sphere, or equivalently by a single properly shaped control pulse generated through the Hamiltonian Eq. (2).

The CX gate is a two-qubit entangling operation defined by

CXc,t=(1000010000010010),(8)\mathrm{CX}_{c,t} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}, \tag*{(8)}

where the first qubit is the control (cc) and the second is the target (tt). Its action can be written as

∣c,t⟩↦∣c,t⊕c⟩,(9)\lvert c,t\rangle\mapsto\lvert c,t \oplus c\rangle, \tag*{(9)}

where c,t∈{0,1}c,t \in\{0,1\} stand for control and target, respectively. The CX gate cannot be decomposed into independent single-qubit operations and therefore requires qubit-qubit couplings, as in Eq. (5). Generating a high-fidelity CX gate depends on a quantum platform’s ability to implement a controlled entangling operation.

Physics-informed neural networks for quantum gates

General operating principle

PINNs provide a unified framework for solving forward and inverse problems governed by differential equations by embedding the physical laws directly into the training process of neural networks. Unlike purely data-driven approaches, PINNs constrain learning by enforcing the governing equations as soft constraints in the loss function. This promotes consistency between the learned solutions and the underlying physics, even in regimes where data are sparse or noisy.

In the context of quantum control, a PINN is designed to approximate both the quantum state (or unitary propagator) and the control functions as outputs of a neural network parameterized by a set of weights and biases. The unitary dynamics can be incorporated into a loss function through a residual term that penalizes deviations between a desired state and one simulated through the Schrödinger equation (1). Moreover, we can construct an ansatz that enforces the initial and pulse boundary conditions [13], while additional loss terms penalize target-gate errors, trace deviations, and large network weights. We propose the following loss function for quantum gates

L=Ldyn+Lgate+Ltrace+Lreg,(10)\mathcal{L} = \mathcal{L}_{\mathrm{dyn}} + \mathcal{L}_{\mathrm{gate}} + \mathcal{L}_{\mathrm{trace}} + \mathcal{L}_{\mathrm{reg}}, \tag*{(10)}

where Ldyn\mathcal{L}_{\mathrm{dyn}} enforces the unitary quantum dynamics of the system, Lgate\mathcal{L}_{\mathrm{gate}} enforces convergence toward the desired unitary operation (e.g., Hadamard or CX), Ltrace\mathcal{L}_{\mathrm{trace}} penalizes deviations from unit trace, and Lreg\mathcal{L}_{\mathrm{reg}} regularizes the network weights.

The scheme of our PINN model for solving the inverse problem in quantum control for quantum gates follows the structure outlined in Ref. [13]. We use the notation z(t)=vec⁡R(ρ^(t))∈Rd2\mathbf{z}(t)=\operatorname{vec}_{\mathbb{R}}(\hat{\rho}(t))\in\mathbb{R}^{d^2} which defines a real-valued vector whose components are given by z(t)=({ρii(t)}i=0d−1,{ℜ(ρij(t)),ℑ(ρij(t))}0≤i<j≤d−1)T\mathbf{z}(t)=\left(\{\rho_{ii}(t)\}_{i=0}^{d-1},\{\Re(\rho_{ij}(t)),\Im(\rho_{ij}(t))\}_{0\leq i<j\leq d-1}\right)^{T}, where ρij(t)=⟨i∣ρ^(t)∣j⟩\rho_{ij}(t)=\langle i\lvert\hat{\rho}(t)\rvert j\rangle are the elements of the density matrix which satisfies the Hermiticity condition ρij(t)=ρji∗(t)\rho_{ij}(t)=\rho_{ji}^{*}(t), so that only the upper triangular elements are treated as independent variables. In the case of a qubit, d=2d=2 so 0≤i<j≤10\leq i<j\leq1, and the component vector reduces to z(t)=(ρ00(t),ρ11(t),ℜ(ρ01(t)),ℑ(ρ01(t)))T\mathbf{z}(t)=\left(\rho_{00}(t),\rho_{11}(t),\Re(\rho_{01}(t)),\Im(\rho_{01}(t))\right)^{T}. We define the control vector as u(t)=(u1(t),⋯ ,uα(t))T∈Rα\mathbf{u}(t)=\left(u_{1}(t),\cdots,u_{\alpha}(t)\right)^{T}\in\mathbb{R}^{\alpha}, where α≥1\alpha\geq1 denotes the number of control functions. In the context of our problem, a quantum gate corresponds to a unitary transformation that must act consistently on any input state [19]. Consequently, we consider multiple target states simultaneously, defined as zd(s)∈Rd2\mathbf{z}_{d}^{(s)}\in\mathbb{R}^{d^2}, where s=1,⋯ ,Ntrs=1,\cdots,N_{\mathrm{tr}} indexes the training inputs and zd(s)\mathbf{z}_{d}^{(s)} represents the desired state associated with ρ^(s)(0)\hat{\rho}^{(s)}(0) through ρ^(s)(0)ρ^(s)(0)†\hat{\rho}^{(s)}(0)\hat{\rho}^{(s)}(0)^{\dagger}. The same control fields are shared by all NtrN_{\mathrm{tr}} state trajectories.

The proposed PINN architecture for quantum gates is shown in Figure 1, which is supported by the universal approximation theorem, which guarantees that feed-forward neural networks with sufficient capacity (appropriate network parameters and non-linear activation functions) can approximate any continuous function in compact domains with arbitrary precision [20]. This provides an approximation basis for representing time-dependent trajectories and controls; consistency with the dynamics must still be assessed through training and independent propagation. In the structure illustrated in Figure 1, our PINN takes as input a set of temporal collocation points t=(t1,⋯ ,tNc)T∈RNc\boldsymbol{t}=(t_1,\cdots,t_{N_c})^T\in\mathbb{R}^{N_c}, is fully connected with (l−1)(l-1) hidden layers of mm neurons per layer, and has an output layer ll. Here, NcN_c denotes the number of collocation points used to discretize the temporal domain during training. Additionally, each perceptron in the hidden layers uses a sinusoidal activation function σ=sin⁡(⋅)\sigma=\sin(\cdot), introducing nonlinearity and enabling the representation of complex temporal features in both the system dynamics and control functions. We further analyze the effects of eight activation functions and three optimizers in Appendix A. These comparisons show that the best choices depend on the target gate and the evaluation metric: lower training loss does not necessarily mean higher gate fidelity. We therefore assess gate performance by independently propagating the learned control fields.

Overview of the PINN framework for designing one- and two-qubit quantum gates via inverse optimal control

Figure 1. Overview of the PINN framework for designing one- and two-qubit quantum gates via inverse optimal control. The network takes time tt as input and produces Nz(t)N_z(t) and Nu(t)N_u(t), which parametrize the density-matrix components z(t)z(t) and control fields u(t)u(t) through the ansatz functions f(t)f(t) and Θ(t)\Theta(t), respectively, incorporating the initial-state and pulse boundary conditions. The control fields enter the time-dependent Hamiltonian H(t)=H0+∑αuα(t)HαH(t)=H_0+\sum_\alpha u_\alpha(t)H_\alpha. Training minimizes a loss function combining the unitary density-matrix dynamical residual, the unit-trace constraint, a target-gate term, and network-parameter regularization. The target-gate term penalizes deviations from ρ^(s)(T)=Oρ^(s)(0)O†\hat{\rho}^{(s)}(T)=O\hat{\rho}^{(s)}(0)O^\dagger for the initial states indexed by ss in the training set, using the same control fields for all states. The feedback loop represents the update of the network parameters through backpropagation. The right panel illustrates a single control field for the Hadamard gate and a family of control fields for the controlled-NOT (CX) gate.

The network outputs Nz(s)(t)N_z^{(s)}(t) and Nu(t)N_u(t) parametrize the state trajectories and the shared controls through

z(s)(t)=z(s)(0)+f(t)Nz(s)(t),u(t)=Θ(t)Nu(t),(11)z^{(s)}(t)=z^{(s)}(0)+f(t)N_z^{(s)}(t), \qquad u(t)=\Theta(t)N_u(t), \tag*{(11)}

where f(t)=1−e−tf(t)=1-e^{-t} and Θ(t)=(1−e−t)n(1−et−T)n\Theta(t)=(1-e^{-t})^n(1-e^{t-T})^n, using the numerical time units of the simulations. The controls satisfy u(0)=u(T)=0u(0)=u(T)=0. The integer n≥1n\ge1 sets the endpoint smoothness: derivatives of Θ\Theta of orders k=0,…,n−1k=0,\ldots,n-1 vanish at both endpoints. We use n=2n=2, so both the control amplitudes and their first derivatives vanish at t=0t=0 and t=Tt=T.

In quantum platforms, control operations use π\pi and π/2\pi/2 resonant pulses, which correspond to time-dependent electromagnetic fields, as demonstrated in solid-state qubit systems such as color centers in diamond [21]. In neutral-atom architectures, these controls are implemented via laser pulses with a time-modulated Rabi frequency Ω(t)\Omega(t), applied over a finite time interval [22]. As a result, the control fields are intrinsically time-localized and are switched on and off during the operation.

We now describe each term in the loss function in Eq. (10). The physics loss term Ldyn\mathcal{L}_{dyn} is defined as:

Ldyn=∑k=1Ntr1Nc∑i=1Nc∥z˙(k)(ti)−L(z(k)(ti))∥22,(12)\mathcal{L}_{dyn}=\sum_{k=1}^{N_{\mathrm{tr}}}\frac{1}{N_c}\sum_{i=1}^{N_c}\left\|\dot{z}^{(k)}(t_i)-\mathcal{L}(z^{(k)}(t_i))\right\|_2^2, \tag*{(12)}

where ∥⋅∥22\|\cdot\|_2^2 is the squared Euclidean norm and L\mathcal{L} is the real-coordinate representation of −i[H(t),ρ^(t)]-i[H(t),\hat{\rho}(t)]. All reported controls are trained with this unitary residual. For the PINN, this term represents the residual of a set of coupled differential equations parametrized by z(t)z(t). The target-gate term Lgate\mathcal{L}_{gate} is written as:

Lgate=η∑k=1Ntr∥z(k)(T)−zd(k)∥22,(13)\mathcal{L}_{gate}=\eta\sum_{k=1}^{N_{\mathrm{tr}}}\left\|z^{(k)}(T)-z_d^{(k)}\right\|_2^2, \tag*{(13)}

where the weight 10−3≤η≤110^{-3} \le\eta\le1 controls the contribution of Lgate\mathcal{L}_{\mathrm{gate}} with respect to Ldyn\mathcal{L}_{\mathrm{dyn}}, ensuring that the learned dynamics are consistent with the desired unitary transformation across simultaneous target state configurations. This term is closely related to the target-gate fidelity we test outside the training setup. We also consider a constraint term to enforce the unit-trace property of the density operator (Tr⁡[ρ^(t)]=1\operatorname{Tr}[\hat{\rho}(t)] = 1), which in terms of the vector z(t)\mathbf{z}(t) reduces to

Ltrace=∑k=1Ntr1Nc∑i=1Nc∣1−∑j=0d−1ρjj(k)(ti)∣2(14)\mathcal{L}_{\mathrm{trace}} = \sum_{k=1}^{N_{\mathrm{tr}}}\frac{1}{N_c}\sum_{i=1}^{N_c}\left|1-\sum_{j=0}^{d-1}\rho_{jj}^{(k)}(t_i)\right|^2 \tag*{(14)}

Finally, the regularization term Lreg=χ∥w∥2\mathcal{L}_{\mathrm{reg}} = \chi\lVert w\rVert^2 penalizes the network weights ww, with strength χ\chi, to mitigate overfitting [23]. This penalty can influence the learned control amplitudes indirectly, but does not impose a hard amplitude or bandwidth bound. The pulse boundary smoothness follows from the ansatz in Eq. (11).

Minimizing L\mathcal{L} provides state trajectories and smooth control pulses for the specified target gate and Hamiltonian. The quality of the resulting gate is assessed independently by propagating the learned controls and evaluating fidelities on input states outside the training set.

Results

In this section, we evaluate the performance of the PINN-derived control fields for both single- and two-qubit quantum gates. First, we assess performance by analyzing the statistical properties of quantum fidelity (mean and standard deviation) using Monte Carlo sampling over random initial states not considered during training. We also calculate the average gate fidelity using the Nielsen formula for unitary evolution. In the weak-dissipation regime, we explicitly show that the fidelity deteriorates linearly with the damping rates for both amplitude and phase damping channels. Finally, we separately analyze the effects of the bilinear couplings σi⊗σi\sigma_i \otimes\sigma_i for the two-qubit gates.

PINN-predicted control for the single-qubit Hadamard operation

The first task for our PINN to reproduce is the single-qubit Hadamard gate. To do so, we consider the Hamiltonian Eq. (3) and a set of four initial states given by:

{∣ψj(0)⟩}j=14={∣0⟩,∣1⟩,∣+⟩,∣−⟩}(15)\{|\psi_j(0)\rangle\}_{j=1}^{4}=\{|0\rangle,|1\rangle,|+\rangle,|-\rangle\} \tag*{(15)}

that corresponds to a set of two mutually unbiased bases: the computational basis {∣ki(1)⟩}={∣0⟩,∣1⟩}\{|k_i^{(1)}\rangle\}=\{|0\rangle,|1\rangle\}, and the Hadamard basis {∣ki(2)⟩}={∣+⟩,∣−⟩}\{|k_i^{(2)}\rangle\}=\{|+\rangle,|-\rangle\}, respectively. For a dd-dimensional Hilbert space, two orthonormal bases

{∣ki(1)⟩}i=1d\{|k_i^{(1)}\rangle\}_{i=1}^{d} and {∣ki(2)⟩}i=1d\{|k_i^{(2)}\rangle\}_{i=1}^{d} are mutually unbiased when [24, 25]:

∣⟨ki(1)|kj(2)⟩∣2=1d,∀i,j.(16)\left|\left\langle k_i^{(1)}\middle|k_j^{(2)}\right\rangle\right|^2=\frac{1}{d},\qquad\forall i,j. \tag*{(16)}

Figure 2 shows the learned control function predicted by our PINN scheme, considering a final evolution time of T=5T=5. It can be observed that the control function exhibits a smooth, well-behaved, continuous, and differentiable time profile. This smoothness reflects the PINN’s ability to approximate physically stable solutions that simultaneously satisfy the system dynamics and the boundary conditions imposed by the target operation. In particular, the smoothness of the pulse indicates that the Hadamard gate can be implemented using stable control trajectories in state space, avoiding the need for rapid or high-frequency modulations. Details of the training convergence and numerical robustness are presented in Section B.

Hadamard-gate control function predicted by PINN

Figure 2. Hadamard-gate control function predicted by PINN. (Top) Shape of the control function satisfying initial and final time conditions described in Sec. III. PINN architecture: 6 hidden layers of 300 neurons each, optimized with 10410^4 epochs with a learning rate of 10−310^{-3}, η=10−1\eta=10^{-1} and χ=10−5\chi=10^{-5}. (Bottom) Total loss function Eq. (10) in terms of epochs.

A lower training loss does not always imply a higher gate fidelity. This means that lower values of the total loss function might end up in a worse fidelity for the target gate. Hence, our figure of merit to evaluate the performance of the control functions predicted by our PINN is the mean fidelity over states outside the training set. In this work, we use the average state fidelity over an ensemble of random pure states, defined as:

Fm=1Ns∑i=1Ns⟨ϕi∣ρ^i(T)∣ϕi⟩,(17)F_m=\frac{1}{N_s}\sum_{i=1}^{N_s}\langle\phi_i|\hat{\rho}_i(T)|\phi_i\rangle, \tag*{(17)}

where ρ^i(T)\hat{\rho}_i(T) is the independently propagated final density operator for the initial pure state ∣ψi(0)⟩|\psi_i(0)\rangle under the learned control. For unitary evolution, ρ^i(T)=∣ψi(T)⟩⟨ψi(T)∣\hat{\rho}_i(T) = \lvert\psi_i(T)\rangle\langle\psi_i(T)\rvert, and each summand reduces to ∣⟨ϕi∣ψi(T)⟩∣2\lvert\langle\phi_i\vert\psi_i(T)\rangle\rvert^2. On the other hand, ∣ϕi⟩=O∣ψi(0)⟩\lvert\phi_i\rangle= O\lvert\psi_i(0)\rangle is the ideal state obtained by the implementation of the target gate OO on the same initial state. The initial pure states are generated randomly according to the Haar measure in Hilbert space using the QuTiP library [26, 27], and NsN_s denotes the number of random initial states.

In the limit of a sufficiently large number of sampled states, this Monte Carlo estimate approaches the average fidelity over the complete set of pure input states

Favg(E,O)=∫dψ⟨ψ∣O†E(ψ)O∣ψ⟩,(18)F_{\mathrm{avg}}(\mathcal{E}, O) = \int d\psi\langle\psi\vert O^\dagger\mathcal{E}(\psi) O\vert\psi\rangle, \tag*{(18)}

where ψ=∣ψ⟩⟨ψ∣\psi= \lvert\psi\rangle\langle\psi\rvert, E(⋅)\mathcal{E}(\cdot) is a completely positive, trace-preserving quantum channel, OO is the unitary operator corresponding to the ideal gate, and the integral is taken over the uniform (Haar) measure dψd\psi on the pure state space. For a quantum operation acting on a Hilbert space of dimension dd, the average gate fidelity defined in Eq. (18) can be written as [28]:

Favg(E,O)=∑jTr⁡(OBj†O†E(Bj))+d2d2(d+1),(19)F_{\mathrm{avg}}(\mathcal{E}, O) = \frac{\sum_j \operatorname{Tr}\left(O B_j^\dagger O^\dagger\mathcal{E}(B_j)\right) + d^2}{d^2(d+1)}, \tag*{(19)}

where {Bj}j=1d2\{B_j\}_{j=1}^{d^2} is a complete basis of unitary operators satisfying Tr⁡[Bj†Bk]=dδjk\operatorname{Tr}[B_j^\dagger B_k] = d\delta_{jk}. Examples of such operator bases are given in [29]. For unitary dynamics acting on the set of operators BjB_j, we have E(Bj)=U(T)BjU†(T)\mathcal{E}(B_j) = U(T)B_jU^\dagger(T). Here, U(T)U(T) denotes the unitary propagator generated by the controlled dynamics at the final time TT.

Figure 3 shows the fidelity behavior associated with the dynamics given by the PINN-predicted control function. Panel (a) shows the time evolution of the average fidelity for the Hadamard gate, evaluated using Ns=103N_s = 10^3 random initial states. Throughout the evolution, the average fidelity follows a smooth temporal behavior and progressively approaches the target operation, reaching its maximum value at the final evolution time TT, with Fm≈99.9999914%F_m \approx99.9999914\%. To further characterize the quality of the obtained gate, panel (b) shows the Monte Carlo distribution of the gate infidelity, represented through the exponent log⁡10(1−F)\log_{10}(1-F), evaluated at the final time. The concentration of the samples around low infidelity values demonstrates that the optimized control provides a consistent implementation of the Hadamard gate over a broad set of sampled pure states distributed by the Haar measure. This trend is reflected in the statistical measures of the distribution, represented by an average infidelity Iavg=8.59×10−8I_{\mathrm{avg}} = 8.59 \times10^{-8}, a standard deviation Istd=3.72×10−8I_{\mathrm{std}} = 3.72 \times10^{-8}, and a range of (1×10−11,1.27×10−7)(1 \times10^{-11}, 1.27 \times10^{-7}). Although the standard deviation is comparable to the mean, the absolute infidelities remain small across the sampled input states. Finally, panel (c) shows how the average infidelity (taken from Eq. (17)) converges to the reference average infidelity extracted from Eq. (19), as the number of sampled pure states NsN_s increases.

PINN-assisted Hadamard fidelity

Figure 3. PINN-assisted Hadamard fidelity. (a) Average fidelity as a function of time for the Hadamard gate, evaluated by Eq. (17). (b) Monte Carlo distribution of the gate infidelity through the exponent log⁡10(1−F)\log_{10}(1-F), evaluated at the final evolution time TT; average infidelity Iavg=8.59×10−8I_{\mathrm{avg}} = 8.59 \times10^{-8}, standard deviation Istd=3.72×10−8I_{\mathrm{std}} = 3.72 \times10^{-8}, minimum infidelity Imin⁡=1×10−11I_{\min} = 1 \times10^{-11}, and maximum infidelity Imax⁡=1.27×10−7I_{\max} = 1.27 \times10^{-7}. (c) Behavior of the average infidelity I=1−FmI = 1-F_m as NsN_s increases. The red-dashed line is the average gate infidelity I(E,O)=1−Favg(E,O)=8.49×10−8\mathcal{I}(\mathcal{E}, O) = 1-F_{\mathrm{avg}}(\mathcal{E}, O) = 8.49 \times10^{-8}.

To assess sensitivity to environmental noise, we reuse the controls trained under unitary dynamics and solve the Lindblad master equation

ρ˙=−i[H(t),ρ]+∑kγkD[Lk]ρ,\dot{\rho} = -i[H(t),\rho] + \sum_k \gamma_k \mathcal{D}[L_k]\rho,
D[L]ρ=LρL†−12{L†L,ρ}.(20)\mathcal{D}[L]\rho= L\rho L^\dagger- \frac{1}{2}\{L^\dagger L,\rho\}. \tag*{(20)}

Here, γk\gamma_k is the coefficient multiplying the normalized jump operator’s dissipator; the operator normalization fixes the relation to physical relaxation or dephasing times. The unitary controls are not retrained in the presence of noise. For γkT≪1\gamma_k T \ll1, the average fidelity of an otherwise ideal gate admits the first-order expansion [15, 16]

F(E,O)=1+∑kγk∫0TδF(Lk(t)) dt+O((γT)2),(21)F(\mathcal{E}, O) = 1 + \sum_k \gamma_k \int_0^T \delta F(L_k(t))\,\mathrm{d}t + \mathcal{O}\left((\gamma T)^2\right), \tag*{(21)}

where LkL_k denotes the Lindblad jump operators associated with the kk-th dissipative process, and δF(Lk(t))\delta F(L_k(t)) quantifies its first-order contribution to the fidelity reduction. For quantum operations confined to the computational subspace, δF(Lk(t))\delta F(L_k(t)) admits a gate-independent analytical expression that depends on the system dimension, the gate duration, and the corresponding dissipative channel [15, 16]. In particular, for an NN-qubit system with local Lindblad operators acting on individual qubits, the first-order contribution can be written explicitly for specific dissipative channels. For a single local pure-dephasing channel with Lindblad operator Lz=σzL_z=\sigma_z and rate γz\gamma_z, the average gate fidelity takes the form

Fz(E,O)=1+γzδF(Lz⊗1N−1)T,(22)F_z(\mathcal{E},\mathcal{O})=1+\gamma_z\delta F(L_z\otimes\mathbb{1}_{N-1})T, \tag*{(22)}

whereas, for amplitude damping with Lindblad operator L−=σ−L_-=\sigma_- and rate γ−\gamma_- (spontaneous emission), the corresponding expression is

F−(E,O)=1+γ−δF(L−⊗1N−1)T,(23)F_-(\mathcal{E},\mathcal{O})=1+\gamma_-\delta F(L_-\otimes\mathbb{1}_{N-1})T, \tag*{(23)}

where 1N−1\mathbb{1}_{N-1} is the identity on the other N−1N-1 qubits and δF(Lz⊗1N−1)=2δF(L−⊗1N−1)=−d/(d+1)\delta F(L_z\otimes\mathbb{1}_{N-1})=2\delta F(L_-\otimes\mathbb{1}_{N-1})=-d/(d+1). We remark that the spontaneous emission process is valid at low temperatures, kBTbath≪ℏω0k_{\mathrm{B}}T_{\mathrm{bath}}\ll\hbar\omega_0, where TbathT_{\mathrm{bath}} is the bath temperature and ℏω0\hbar\omega_0 is the qubit energy scale. For higher bath temperatures, one must include the absorption mechanism, i.e., L+=σ+L_+=\sigma_+ with rate γ+\gamma_+. In the case of a qubit, Eqs. (22) and (23) simplify to Fz(E,O)=1−(2/3)γzTF_z(\mathcal{E},\mathcal{O})=1-(2/3)\gamma_zT and F−(E,O)=1−(1/3)γ−TF_-(\mathcal{E},\mathcal{O})=1-(1/3)\gamma_-T, respectively, showing the linear reduction in average gate fidelity with the decay rate. For operations that evolve outside the computational subspace, this simplification no longer applies; in this case, δF(Lk(t))\delta F(L_k(t)) depends explicitly on the time-evolved jump operator Lk(t)=U†(t)LkU(t)L_k(t)=U^\dagger(t)L_kU(t) and is evaluated using the generalized expression derived in [16].

In Figure 4, we show the behavior of the average fidelity of the PINN-assisted Hadamard implementation under pure dephasing (blue curve) and amplitude damping (red curve) noisy channels. Each curve is obtained by extracting the control function from the PINN trained in the unitary case (γ=0\gamma=0), and then solving the Markovian quantum dynamics for a fixed value of γ\gamma with the control function in the Hamiltonian. Finally, the average fidelity at the final time is computed over Ns=103N_s=10^3 random initial states for each value of γ\gamma. As expected, the average fidelity decreases monotonically with the decay rate γ\gamma for both noisy channels, showing the progressive degradation induced by the interaction with the environment. For the jump-operator normalizations in Eq. (20) and equal numerical rates, pure dephasing produces a larger fidelity reduction than amplitude damping, consistent with their respective first-order coefficients. The inset shows the behavior of our results in the weaker regime (γT≪1\gamma T\ll1), where symbols illustrate the corresponding first-order approximation given by Eqs. (22) and (23) for the average fidelity FzF_z and F−F_-, respectively. The match among symbols and curves corroborates the linear dependence of the fidelity with respect to the decay rate.

Average fidelity under noisy channels for Hadamard

Figure 4. Average fidelity under noisy channels for Hadamard. Eq. (17) computed for the Hadamard gate considering pure dephasing (blue curve) and amplitude damping (red curve), as a function of the decay rate γ/Δ∈[0,10−1]\gamma/\Delta\in[0,10^{-1}]. The inset shows a zoom of the weak-dissipation regime (γT≪1\gamma T \ll1), where Fz(E,O)F_z(\mathcal{E},\mathcal{O}) and F−(E,O)F_-(\mathcal{E},\mathcal{O}) correspond to the average gate fidelities according to Eqs. (22) and (23) respectively.

PINN-predicted controls for the two-qubit CX gate

We now extend the analysis to two-qubit systems and investigate the performance of the control functions predicted by the PINN to implement the CX gate, considering longitudinal and transverse couplings between the qubits. The PINN training hyperparameters are held constant across all qubit-qubit couplings, so that all coupling configurations are compared using the same network architecture and training protocol. In particular, our PINN architecture consists of 5 hidden layers and 300 neurons per layer, optimized over 2.5×1042.5\times10^4 epochs, with a learning rate of 1×10−31\times10^{-3}, a regularization hyperparameter of 1×10−41\times10^{-4}, and a weight of 1×10−11\times10^{-1} for each target.

The six time-dependent local control functions predicted by the PINN for the CX gate under different qubit-qubit couplings (a) σx⊗σx(a)\ \sigma_x\otimes\sigma_x, (b) σy⊗σy(b)\ \sigma_y\otimes\sigma_y and (c) σz⊗σz(c)\ \sigma_z\otimes\sigma_z are considered separately to analyze the effects of the predicted functions. The three control functions acting on the control qubit are shown in the left panels while those acting on the target qubit are plotted in the right panels.

The set of initial states used to train the PINN for the CX gate implementation follows the same structure of unbiased bases described in the Hadamard case. For this two-qubit scenario, we consider three distinct 8-state sets as follows: S1={∣k(1)⟩∪∣k(3)⟩}S_1=\{\lvert k^{(1)}\rangle\cup\lvert k^{(3)}\rangle\}, S2={∣k(1)⟩∪∣k(2)⟩}S_2=\{\lvert k^{(1)}\rangle\cup\lvert k^{(2)}\rangle\}, and S3={∣k(2)⟩∪∣k(4)⟩}S_3=\{\lvert k^{(2)}\rangle\cup\lvert k^{(4)}\rangle\}, where ∣k(1)⟩,∣k(2)⟩,∣k(3)⟩,∣k(4)⟩\lvert k^{(1)}\rangle,\lvert k^{(2)}\rangle,\lvert k^{(3)}\rangle,\lvert k^{(4)}\rangle are given by:

∣k(1)⟩={∣00⟩,∣01⟩,∣10⟩,∣11⟩},∣k(2)⟩={∣++⟩,∣+−⟩,∣−+⟩,∣−−⟩},∣k(3)⟩={∣χ00⟩,∣χ01⟩,∣χ10⟩,∣χ11⟩},∣k(4)⟩={∣Φ+⟩,∣Φ−⟩,∣Ψ+⟩,∣Ψ−⟩}.\begin{aligned} \lvert k^{(1)}\rangle&=\{\lvert00\rangle,\lvert01\rangle,\lvert10\rangle,\lvert11\rangle\},\\ \lvert k^{(2)}\rangle&=\{\lvert++\rangle,\lvert+-\rangle,\lvert-+\rangle,\lvert--\rangle\},\\ \lvert k^{(3)}\rangle&=\{\lvert\chi_{00}\rangle,\lvert\chi_{01}\rangle,\lvert\chi_{10}\rangle,\lvert\chi_{11}\rangle\},\\ \lvert k^{(4)}\rangle&=\{\lvert\Phi_+\rangle,\lvert\Phi_-\rangle,\lvert\Psi_+\rangle,\lvert\Psi_-\rangle\}. \end{aligned}

∣k(1)⟩\lvert k^{(1)}\rangle and ∣k(2)⟩\lvert k^{(2)}\rangle stand for the computational and Hadamard bases, respectively. ∣k(3)⟩={∣χij⟩=CZ∣kij(2)⟩}\lvert k^{(3)}\rangle=\{\lvert\chi_{ij}\rangle=CZ\lvert k_{ij}^{(2)}\rangle\} is obtained after applying the controlled-phase

(CZ) gate on the Hadamard basis, and ∣k(4)⟩|k^{(4)}\rangle is composed of the entangled states ∣Φ±i⟩=12(∣00⟩±i∣11⟩)|\Phi_{\pm i}\rangle=\frac{1}{\sqrt{2}}(|00\rangle\pm i|11\rangle) and ∣Ψ±i⟩=12(∣01⟩±i∣10⟩)|\Psi_{\pm i}\rangle=\frac{1}{\sqrt{2}}(|01\rangle\pm i|10\rangle). Figure 5 shows the results for S3\mathcal{S}_3.

Local control functions for the CX gate

Figure 5. Local control functions for the CX gate. (a) σx⊗σx\sigma_x \otimes\sigma_x, (b) σy⊗σy\sigma_y \otimes\sigma_y and (c) σz⊗σz\sigma_z \otimes\sigma_z. Left panels show functions on the control qubit (qubit 1) and right panels on the target qubit (qubit 2). Insets show a zoom of the control functions that are at least two orders of magnitude smaller. The set of initial states is S3\mathcal{S}_3.

Our results show that a CX gate with high fidelity might be simulated with every considered coupling (σx⊗σx→Favg(E,O)≈99.99997%\sigma_x\otimes\sigma_x\to F_{\mathrm{avg}}(\mathcal{E},O)\approx99.99997\%, σy⊗σy→99.99951%\sigma_y\otimes\sigma_y\to99.99951\% and σz⊗σz→99.99988%\sigma_z\otimes\sigma_z\to99.99988\%). However, the local control differs in each case. In particular, for the coupling along σx\sigma_x, the learned solution has three appreciable controls on the control qubit and one dominant control on the target qubit. The function ux(2)u_x^{(2)} (black curve in the right panel of Figure 5(a)) is about two orders of magnitude greater than the functions along yy and zz. A similar behavior is observed for the coupling along σz\sigma_z but now requiring a single control (uz(1)u_z^{(1)}) on the control qubit. This can be explained from the block structure of the CX gate Eq. (8), which is diagonal for the control qubit in the computational basis {∣0⟩,∣1⟩}\{|0\rangle,|1\rangle\} while diagonal in the Hadamard basis {∣+⟩,∣−⟩}\{|+\rangle,|-\rangle\} for the target qubit. Hence, the opposite behavior exhibited by the control functions for these two couplings reflects the fact that a direction is favored by the system to organize the local control according to the considered coupling. This is also in agreement with the control functions predicted for the σy⊗σy\sigma_y\otimes\sigma_y coupling. In this case, neither the computational basis nor the Hadamard one is favored by the coupling, and the learned solution has six appreciable components. This observation does not establish a minimum number of controls. The complementary results for sets S1\mathcal{S}_1 and S2\mathcal{S}_2 are presented in Section A.

On the other hand, in addition to achieving high fidelity, the control functions predicted by our PINN are also represented by smooth curves, do not present rapid oscillations and satisfy the additional condition ∂u∂t(0)=∂u∂t(T)=0\frac{\partial u}{\partial t}(0)=\frac{\partial u}{\partial t}(T)=0. This ensures smooth switching at the initial and final times. These features complement gate-design approaches such as those in Refs. [12, 30, 31] by combining high fidelity with explicit pulse boundary conditions and independent dynamical validation.

The high fidelity performance of the CX gate implementation is represented in terms of the infidelity behavior in Figure 6. The average infidelity obtained from Eq. (17) converges to the reference value from Eq. (19), as the number of randomly sampled pure states increases. This convergence holds for the three qubit-qubit couplings as indicated by the red dashed line.

Average infidelity convergence for the CX gate

Figure 6. Average infidelity convergence for the CX gate. Average infidelity estimated from Eq. (17) as NsN_s increases for the different coupling configurations. (a) σx⊗σx\sigma_x \otimes\sigma_x, (b) σy⊗σy\sigma_y \otimes\sigma_y, and (c) σz⊗σz\sigma_z \otimes\sigma_z. The red line represents the average gate infidelity I(E,O)=1−Favg(E,O)I(\mathcal{E},O)=1-F_{\mathrm{avg}}(\mathcal{E},O) (Eq. (19)}): (a) I(E,O)=3.39×10−7I(\mathcal{E},O)=3.39\times10^{-7}, (b) I(E,O)=4.96×10−6I(\mathcal{E},O)=4.96\times10^{-6} and (c) I(E,O)=1.17×10−6I(\mathcal{E},O)=1.17\times10^{-6}.

Furthermore, to confirm these robust results, we also evaluate the predicted control functions on a test set of states outside the PINN training. Specifically, set S3\mathcal{S}_3 is used for training, while set S1\mathcal{S}_1, which is a set of mutually unbiased bases different from S3\mathcal{S}_3, is used for testing.

Hence, the tested infidelity can be seen as a heat map in Figure 7 for the eight states of S1S_1. These results evidence that the predicted control functions reproduce the desired CX gate for states that were not included in the training set with high fidelity (every box in Figure 7 shows the corresponding infidelity value for each coupling and each considered basis state). The σy⊗σy\sigma_y \otimes\sigma_y solution exhibits larger test infidelities than the other two coupling configurations. This corroborates the above analysis on the behavior of the control functions shown in Figure 5. Finally, our results also show that considering control functions along the Pauli axes where the qubit-qubit coupling takes place helps to improve the fidelity of the objective gate. A reduced-control comparison for the ZZ coupling is presented in Appendix A. A discussion on the Monte Carlo distribution of the gate infidelity, the fidelity behavior under noisy channels, as well as the dependence on the number of control functions, is also presented in Section A.

Infidelity heat map for the eight test states and three couplings

Figure 7. Testing of the PINN-predicted control functions for each coupling. Infidelity heat map computed on the set of states S1S_1 for each coupling. The colored bar shows the infidelity exponent p=log⁡10(Ii)p = \log_{10}(I_i). The corresponding average infidelities are ∼4×10−7\sim4 \times10^{-7}, ∼5.24×10−6\sim5.24 \times10^{-6}, and ∼1.2×10−6\sim1.2 \times10^{-6} for σx⊗σx\sigma_x \otimes\sigma_x, σy⊗σy\sigma_y \otimes\sigma_y, and σz⊗σz\sigma_z \otimes\sigma_z, respectively.

High-fidelity CX gate for the spin-like XY coupling

Spin-like XY interaction, which can arise from dipole-mediated coupling, is a natural mechanism for exchanging excitations between two two-level systems such as superconducting transmons or phase qubits [32], polar molecules [33] and Rydberg atoms with opposite parity states [34]. This interaction, described by a (σx⊗σx+σy⊗σy)(\sigma_x \otimes\sigma_x + \sigma_y \otimes\sigma_y) coupling, produces population exchanges between the intermediate states ∣01⟩\lvert01\rangle and ∣10⟩\lvert10\rangle, which become important for SWAP-like gates and entanglement generation [35, 36]. Thus, in this section we focus on the PINN-predicted quantum control functions for the CX gate in a two-qubit system with the reference XY interaction Hamiltonian [2]:

H3(t)=Δ2(σz⊗1+1⊗σz)+g2(σx⊗σx+σy⊗σy)+Ω12σx⊗1+Ω221⊗σx,(24)H_3(t) = \frac{\Delta}{2}(\sigma_z \otimes\mathbb{1} + \mathbb{1} \otimes\sigma_z) + \frac{g}{2}(\sigma_x \otimes\sigma_x + \sigma_y \otimes\sigma_y) + \frac{\Omega_1}{2}\sigma_x \otimes\mathbb{1} + \frac{\Omega_2}{2}\mathbb{1} \otimes\sigma_x, \tag*{(24)}

where Δ\Delta denotes the detuning of both qubits with respect to the external excitation, gg is the XY coupling strength and Ωi\Omega_i stands for the strength of the local external excitation field acting on the ii-th qubit.

Following the discussion in previous sections, we implement the CX gate by considering five different configurations of the reference Hamiltonian as follows (local controls along σx\sigma_x are considered to be time-dependent such that Ωi=ux(i)(t)\Omega_i = u_x^{(i)}(t)): (i) Detuning Δ\Delta is considered to be modulated in time and distinct for each qubit, i.e., Δi=uz(i)(t)\Delta_i = u_z^{(i)}(t). (ii) Additional local time-dependent controls along σy\sigma_y are included (six controls in total as in Section IV B). The other three setups consider controls ux(i)(t)u_x^{(i)}(t) and uy(i)(t)u_y^{(i)}(t), but fixed detuning on σz\sigma_z with values (iii) Δ/g=0\Delta/g = 0, (iv) Δ/g=1/2\Delta/g = 1/2 and (v) Δ/g=2\Delta/g = 2.

Figure 8 shows the control functions predicted by the PINN for these configurations. Although the target operation is the same in all cases, the resulting control functions differ notably in both amplitude and shape. In all cases, the control functions predicted by our PINN successfully implement the CX gate, with setup (ii) being the best scenario, reaching an infidelity of ∼1.24×10−6\sim1.24 \times10^{-6}. The remaining four cases yield slightly larger infidelities: ∼2.50×10−6\sim2.50 \times10^{-6} for setup (i), ∼3.84×10−6\sim3.84 \times10^{-6} for setup (iii), ∼7.94×10−6\sim7.94 \times10^{-6} for setup (iv), and ∼3.61×10−5\sim3.61 \times10^{-5} for setup (v). Although these values are higher than that of setup (ii), they remain small, so all five scenarios achieve high-fidelity gates.

CX gate PINN-predicted control functions

Figure 8. CX gate PINN-predicted control functions for the spin-like XY Hamiltonian Eq. (24). (i) Independent detuning controls, (ii) independent detuning controls with additional uy(1)u_y^{(1)} and uy(2)u_y^{(2)} controls. (iii), (iv) and (v) correspond to local controls ux(1)u_x^{(1)}, ux(2)u_x^{(2)}, uy(1)u_y^{(1)}, and uy(2)u_y^{(2)} for fixed detuning Δ/g=0\Delta/g=0, Δ/g=1/2\Delta/g=1/2, and Δ/g=2\Delta/g=2, respectively.

From an experimental perspective, the amplitude of each control function corresponds to the strength of the external driving field applied to the system. In the Hamiltonian, the control functions act as time-dependent Rabi frequencies, which are proportional to the field amplitude (e.g., the microwave drive voltage in superconducting circuits), while the corresponding power scales quadratically with it. Consequently, control pulses with smaller amplitudes require weaker excitation and can reduce the required drive strength, subject to platform-specific calibration and bandwidth constraints. Our results show that the six-control setup (ii) requires smaller amplitudes: its peak control amplitudes are approximately half, or less, of those of the largest controls in the four-control configurations. This implies weaker external driving fields, which is advantageous from an experimental standpoint.

Although the magnitude of the control functions could be reduced by increasing the regularization strength in the PINN loss function, this also restricts the space of admissible PINN solutions, which typically results in larger infidelities. Hence, a trade-off exists between the control amplitude and the achievable gate fidelity. Figure 9 shows the convergence of the Monte Carlo estimate of the average infidelity for the five configurations of the XY Hamiltonian. In most cases, the estimate stabilizes around the reference value given by the average gate infidelity of the CX gate, Eq. (19), as NsN_s increases. Case (i), however, shows larger fluctuations and a slower stabilization, remaining slightly below the reference value for Ns=2×104N_s=2\times10^4. Therefore, unlike in the previous sections, we increased the number of sampled states to Ns=3×104N_s=3\times10^4 in this case to obtain a more stable convergence. These fluctuations concern the finite-sample fidelity estimate. The sampled curves for cases (ii)–(v) stabilize more rapidly in the reported calculations. As before, the robustness with respect to dissipation is left to Section C.

CX gate average infidelity convergence for the XY coupling

Figure 9. CX gate average infidelity convergence for the XY coupling. Behavior of the average infidelity estimated from Eq. (17) as NsN_s increases for the different cases of the XY Hamiltonian. Setups (i)-(v) are the same as those considered in Figure 8. The red dashed line stands for the average gate infidelity I(E,O)I(\mathcal{E}, O) given through Eq. (19).

Control resources for high-fidelity two-qubit gates

The available local control directions ul(1,2)(t)u_l^{(1,2)}(t) are essential to achieve controllability in the system. In particular, restricting these directions can preserve a symmetry that imposes an upper bound on the achievable gate fidelity. For example, consider the ZZZZ interaction with only local xx controls

HZZ(t)=Jz σz⊗σz+ux(1)(t) σx⊗1+ux(2)(t) 1⊗σx.(25)H_{ZZ}(t)=J_z\,\sigma_z\otimes\sigma_z +u_x^{(1)}(t)\,\sigma_x\otimes1+u_x^{(2)}(t)\,1\otimes\sigma_x. \tag*{(25)}

Each term commutes with P=σx⊗σxP=\sigma_x\otimes\sigma_x, so the unitary propagator starting from U(0)=1⊗1U(0)=1\otimes1 satisfies [U(T),P]=0[U(T),P]=0 for any pulse shape and duration time TT. For the fixed target C=CX1,2C=\mathrm{CX}_{1,2} in the computational basis, with the first qubit as the control, define

Q≡C+PCP2=1⊗1+σx2.(26)Q\equiv\frac{C+PCP}{2}=1\otimes\frac{1+\sigma_x}{2}. \tag*{(26)}

Writing U=U(T)U=U(T), we use cyclicity of the trace, PUP=UPUP=U, and C=C†C=C^\dagger to obtain Tr⁡(C†U)=Tr⁡(QU)\operatorname{Tr}(C^\dagger U)=\operatorname{Tr}(QU). Since QQ is a rank-two orthogonal projector and UU is unitary, ∣Tr⁡(QU)∣≤2|\operatorname{Tr}(QU)| \le2. The average gate fidelity over Haar-distributed pure input states [28] therefore satisfies, for EU(ρ)=U(T)ρU†(T)\mathcal{E}_U(\rho)=U(T)\rho U^\dagger(T),

Favg(EU,C)=∣Tr⁡(C†U)∣2+420≤25(27)F_{\mathrm{avg}}(\mathcal{E}_U,C)=\frac{|\operatorname{Tr}(C^\dagger U)|^2+4}{20}\le\frac{2}{5} \tag*{(27)}
I(EU,C)=1−Favg(EU,C)≥35=0.6.(28)I(\mathcal{E}_U,C)=1-F_{\mathrm{avg}}(\mathcal{E}_U,C)\ge\frac{3}{5}=0.6. \tag*{(28)}

This bound is independent of the optimization method and applies to unitary evolution under Eq. (25), without additional local rotations before or after the implemented propagator. We remark that this 0.6 value is reported in Figure 15 (see Appendix A). Local fields along yy break the conserved symmetry and remove this particular obstruction; achieving high fidelity also depends on the remaining control constraints. The comparison of two- and four-control configurations presented in this work illustrates how the available control directions can improve CX fidelities.

Control functions for the CX gate using four local controls in the top panels and two local controls in the bottom panels

Figure 15. CX gate with a reduced number of control functions. Shape of the control functions for the CX gate by using only four (top) and two (bottom) local controls which are transverse to the considered coupling, here σz⊗σz\sigma_z \otimes\sigma_z. The average gate infidelities are I(E,O)=3.59×10−6I(\mathcal{E},O)=3.59 \times10^{-6} and I(E,O)=6×10−1I(\mathcal{E},O)=6 \times10^{-1}, respectively.

Compact control representations and square-pulse playback

Now, we represent the PINN control functions using a Chebyshev expansion to validate their continuous reconstructions and square-pulse approximations in a low-dimensional parameter space. This separates the high-dimensional training parametrization from the exported waveform representation. In particular, Chebyshev expansions have also been used to tabulate neural control pulses [11]; here we separately quantify representation and playback errors across the full collection of archived protocols, and assess gate fidelity after conversion to square pulses as a step toward device-specific implementation.

The Chebyshev polynomials of the first kind are defined by

Tn(x)=cos⁡(narccos⁡x),−1≤x≤1,(29)T_n(x)=\cos(n\arccos x),\qquad-1\le x\le1, \tag*{(29)}

with T0(x)=1T_0(x)=1, T1(x)=xT_1(x)=x, and the recurrence Tn+1(x)=2xTn(x)−Tn−1(x)T_{n+1}(x)=2xT_n(x)-T_{n-1}(x). For each scalar control uμ(t)u_\mu(t), we use

uμ,K(t)=16s2(1−s)2∑n=0K−1cμnTn(2s−1),s=t/T,(30)u_{\mu,K}(t)=16s^2(1-s)^2\sum_{n=0}^{K-1}c_{\mu n}T_n(2s-1),\qquad s=t/T, \tag*{(30)}

where KK is the number of coefficients per scalar control. Thus, a gate representation with ncn_c scalar controls uses ncKn_cK coefficients: at the selected K∗=24K_* = 24, this gives 24 coefficients for Hadamard, 48 for a two-control protocol, 96 for a four-control protocol, and 144 for a six-control protocol. This counts waveforms, whereas the PINN also represents state trajectories. The prefactor and its first derivative vanish at both endpoints, enforcing uμ,K(0)=uμ,K(T)=0u_{\mu,K}(0)=u_{\mu,K}(T)=0 and u˙μ,K(0)=u˙μ,K(T)=0\dot{u}_{\mu,K}(0)=\dot{u}_{\mu,K}(T)=0. The polynomial has degree at most K+3K+3, hence 27 at K∗=24K_*=24. Its zero continuation outside the gate interval is C1C^1. Boundary flatness is imposed on the reconstruction: the endpoint values of sampled inputs do not determine their endpoint derivatives.

Each control is sampled on the uniform grid ti=iΔtt_i=i\Delta t, with Δt=T/(Nsamp−1)\Delta t=T/(N_{\mathrm{samp}}-1) and i=0,…,Nsamp−1i=0,\ldots,N_{\mathrm{samp}}-1, including both endpoints. We use Nsamp=500N_{\mathrm{samp}}=500 and T=5T=5 in the numerical time units of each simulation, so si=i/(Nsamp−1)s_i=i/(N_{\mathrm{samp}}-1). For every KK, the coefficients are fitted independently by solving the unweighted linear least-squares problem

c^μ,K=arg⁡min⁡c∈RK 1Nsamp∑i=0Nsamp−1[uμ(ti)−uμ,K(ti;c)]2.(31)\hat{\mathbf{c}}_{\mu,K}=\underset{\mathbf{c}\in\mathbb{R}^K}{\arg\min}\ \frac{1}{N_{\mathrm{samp}}}\sum_{i=0}^{N_{\mathrm{samp}}-1}\left[u_\mu(t_i)-u_{\mu,K}(t_i;\mathbf{c})\right]^2. \tag*{(31)}

The design matrix has entries Φin=16si2(1−si)2Tn(2si−1)\Phi_{in}=16s_i^2(1-s_i)^2T_n(2s_i-1), and the least-squares problem is solved using singular-value decomposition. No regularization or gate-fidelity refinement is applied. The mean squared error of each fitted control is

MSE⁡μ(K)=1Nsamp∑i=0Nsamp−1[uμ(ti)−u^μ,K(ti)]2,(32)\operatorname{MSE}_\mu(K)=\frac{1}{N_{\mathrm{samp}}}\sum_{i=0}^{N_{\mathrm{samp}}-1}\left[u_\mu(t_i)-\hat{u}_{\mu,K}(t_i)\right]^2, \tag*{(32)}

where u^μ,K(t)=uμ,K(t;c^μ,K)\hat{u}_{\mu,K}(t)=u_{\mu,K}(t;\hat{\mathbf{c}}_{\mu,K}). Figure 10(a) reports the arithmetic mean of these errors for each model mm,

Compact representations and square-pulse playback of 139 learned scalar controls

Figure 10. Compact representations and square-pulse playback of 139 learned scalar controls. (a) Model-averaged MSE, Eq. (33), versus KK for the C1C^{1} basis 16s2(1−s)2Tn(2s−1)16s^{2}(1-s)^{2}T_{n}(2s-1). Eleven families comprise the original nine models and the pooled two- and four-control cases. Fitted waveforms satisfy u(0)=u(T)=u˙(0)=u˙(T)=0u(0)=u(T)=\dot{u}(0)=\dot{u}(T)=0 by construction. The horizontal dashed line marks 10−610^{-6}, and the vertical dotted line marks K∗=24K_{*}=24, the smallest common coefficient count for which all eleven model-averaged MSEs lie below this threshold. (b) The K=30K=30 fit (black) for ux(2)(t)/gu_{x}^{(2)}(t)/g in XY configuration (v), S3S_{3}, and midpoint-sampled square pulses with N=8,32,128N=8,32,128. (c) Target-gate infidelity for joint square, first-order Lie–Trotter, and second-order Strang propagation. Colored curves show medians over Hadamard and the 27 two-qubit protocols with at least four controls: solid lines use interval averages and dashed lines use midpoints. Colored bands span the full minimum–maximum range over those 28 protocols for interval averages; they indicate protocol variability, not confidence intervals. The gray envelope and thin solid line show the range and pooled median of all 18 method/sampling/protocol curves of the three two-control cases; the horizontal line I=0.6I=0.6 marks their analytical floor. The gray dotted line is the median continuous-fit target infidelity for the 28-protocol group. (d) Saved samples of the same control (black) and fits with K=6,12,30K=6,12,30. All propagations use T=5T=5 and the corresponding Hamiltonian normalizations. Ideal square schedules switch abruptly and do not inherit the polynomial fits’ C1C^{1} regularity.

MSE⁡‾m(K)=1Mm∑μ∈CmMSE⁡μ(K),(33)\overline{\operatorname{MSE}}_m(K)=\frac{1}{M_m}\sum_{\mu\in\mathcal{C}_m}\operatorname{MSE}_\mu(K), \tag*{(33)}

where Cm\mathcal{C}_m contains the scalar controls associated with model mm and Mm=∣Cm∣M_m=|\mathcal{C}_m|. The original nine families retain equal channel weights: Mm=1M_m=1 for Hadamard, Mm=18M_m=18 for each of CX–XX, CX–YY, CX–ZZ, and dipolar case (ii), and Mm=12M_m=12 for dipolar cases (i), (iii), (iv), and (v). Each two-qubit family pools its three training sets. Two additional resource families pool the XXXX, YYYY, and ZZZZ reduced-control cases trained on S3\mathcal{S}_3: Mm=6M_m=6 for two controls and Mm=12M_m=12 for four controls. The complete analysis therefore comprises 139 scalar controls, 31 gate protocols, and 11 model/resource families.

Every integer K=1,…,40K=1,\ldots,40 is evaluated. The nested fitting spaces give nonincreasing least-squares errors in exact arithmetic. We select the smallest common coefficient count satisfying max⁡mMSE⁡‾m(K)<10−6\max_m\overline{\operatorname{MSE}}_m(K)<10^{-6} and denote it by K∗K_*. This waveform tolerance is motivated by the order of the representative reported gate infidelities, but it is a separate criterion: MSE and gate infidelity are different quantities. The resulting K∗=24K_*=24 gives a largest model-averaged MSE of 8.35×10−78.35\times10^{-7}, whereas K=23K=23 gives 1.66×10−61.66\times10^{-6}; dipolar case (v) is limiting in both cases. Thus, K∗K_* is optimal only in the sense of the fewest coefficients meeting the adopted model-averaged tolerance. Figure 10(a) marks the threshold and K∗K_*. These sampled, absolute squared-amplitude means bound neither the individual controls nor errors between samples.

We independently propagate a shape-preserving piecewise-cubic (PCHIP) interpolation of the saved samples, obtaining UsU_s, and evaluate the fitted polynomials directly to obtain UKU_K. This compares representations of the supplied controls without reevaluating the neural network. Complex double-precision DOP853 propagation uses relative and absolute tolerances 10−1010^{-10} and 10−1210^{-12}. Tightening both tenfold and halving the maximum step gives normalized, globally phase-aligned Frobenius differences below 1.8×10−111.8 \times10^{-11} for the continuous polynomial propagations. We distinguish fit-induced infidelity 1−Favg(UK,Us)1-F_{\mathrm{avg}}(U_K,U_s) from target infidelity 1−Favg(UK,O)1-F_{\mathrm{avg}}(U_K,O), using the fidelity between unitary channels. At fixed K=30K=30, the maximum fit-induced infidelity over all 31 protocols is 1.25×10−101.25 \times10^{-10}, and the largest target-infidelity increase is 9.16×10−89.16 \times10^{-8}. Thus, waveform fitting and gate preservation are tested separately rather than inferred from MSE alone.

For the independent playback validation below, we retain the more conservative K=30K=30 for every protocol, whose largest model-averaged MSE is 3.56×10−83.56 \times10^{-8}, and divide [0,T][0,T] into NN equal intervals of duration δt=T/N\delta t=T/N. Each square-pulse amplitude is either the value uˉμ,30\bar{u}_{\mu,30} at the interval midpoint or its exact average over the interval. Polynomial averages are evaluated analytically, without reinterpolating the fitted controls. Writing the resulting frozen Hamiltonian as Hˉj=H0+∑μuˉμjHμ\bar{H}_j=H_0+\sum_\mu\bar{u}_{\mu j}H_\mu, the joint square-pulse propagator is

Usq(N)(T)=e−iδtHˉN−1⋯e−iδtHˉ0.(34)U_{\mathrm{sq}}^{(N)}(T)=e^{-i\delta t\bar{H}_{N-1}}\cdots e^{-i\delta t\bar{H}_0}. \tag*{(34)}

This propagation retains the drift and all local fields simultaneously within each interval. The square schedule does not inherit C1C^1 regularity: switching between plateaus introduces abrupt changes. Lie–Trotter and symmetric Strang formulas provide additional approximations by splitting each frozen Hamiltonian into its Pauli terms in a fixed order. These product formulas are optional: forming a square waveform does not itself require a Trotter decomposition. We distinguish the discretization error relative to the continuous K=30K=30 propagator from the additional splitting error relative to Eq. (34).

Figure 10(b) illustrates square-pulse conversion; panel (d) compares K=6,12,30K=6,12,30 for the same ux(2)/gu_x^{(2)}/g control in XY configuration (v), S3\mathcal{S}_3. For panel (c), resource availability defines two groups before fidelity is evaluated. The six colored curves show medians for Hadamard and all 27 two-qubit protocols with at least four controls. The gray envelope retains all 18 combinations of three methods, two sampling rules, and the three two-control protocols. The XX case with two local yy controls conserves P=σy⊗σyP=\sigma_y\otimes\sigma_y; the YY and ZZ cases with two local xx controls conserve P=σx⊗σxP=\sigma_x\otimes\sigma_x. The projected CX operator has rank two in each case, giving the target-infidelity floor I≥0.6I\geq0.6 in Eq. (28). Their continuous K=30K=30 infidelities are approximately 0.797564, 0.600354, and 0.600003, respectively. The floor does not establish optimality of these particular pulses.

For N∈{1,2,4,8,16,32,64,128,256,512,1024}N\in\{1,2,4,8,16,32,64,128,256,512,1024\}, joint square and Strang propagation preserve their continuous polynomial references within infidelity 10−510^{-5} for all 31 protocols from N=128N=128 onward on the tested grid, with either sampling rule. Target infidelity is ≤10−4\leq10^{-4} for 27 of the 28 resource-group protocols at N=128N=128 and all larger tested NN. The remaining XY configuration (v), S2\mathcal{S}_2, has a saved-control infidelity of 1.5604×10−31.5604\times10^{-3} (1.5604×10−31.5604\times10^{-3} after fitting), so it remains visible in the analysis. Its larger target error precedes digital approximation. These results distinguish accurate playback of a control from the accuracy of that control’s target gate.

Square-pulse tables can be supplied to pulse-programming interfaces such as Qblox/Quantify Scheduler, QUA, and LabOne Q [37, 38, 39, 40]. However, sampling and scheduling limits differ: Qblox has 1-ns digital-to-analog converter samples but a 4-ns minimum for separate real-time operations on a 1-ns grid [41]. QUA distinguishes OPX1000 minima of 4 ns in the configuration and 8 ns for duration overrides from the OPX+ minimum of 16 ns [39]. At 2.4 GS/s, HDAWG samples are 0.417 ns apart, but independently played waveforms require 32 samples, with 16-sample increments (13.33 and 6.67 ns) [42]. These minima do not constrain every plateau inside a longer waveform. For τ=ω⋆tphys\tau=\omega_\star t_{\mathrm{phys}}, δtphys=T/(Nω⋆)\delta t_{\mathrm{phys}}=T/(N\omega_\star) must respect the relevant grid and minimum when separately scheduled. Physical claims require frequency/amplitude calibration and finite-bandwidth validation. Ideal Trotter factors also require generator isolation or refocusing with an active drift; factor counts are not laboratory times. For illustration, ω⋆/(2π)=1\omega_\star/(2\pi)=1 MHz gives Tphys=0.796 μsT_{\mathrm{phys}}=0.796\,\mu\mathrm{s} and δtphys=6.22\delta t_{\mathrm{phys}}=6.22 ns at N=128N=128. At N=256N=256, the interval is approximately 3.11 ns, below a 4-ns minimum for independent operations despite exceeding a 1-ns sample period. The validated representation preserves the supplied control evolution; physical waveform delivery and experimental gate accuracy remain separate device-specific questions.

Conclusions

In this work, we developed a physics-informed neural network approach to design one- and two-qubit quantum gates using time-dependent control fields. By training simultaneously on initial states drawn from pairs of mutually unbiased bases, the method extends state-to-state control to implementing a target operation on multiple inputs. The network approximates the corresponding state trajectories and control functions while incorporating the quantum dynamics into the training objective. The neural network parametrization enforces the initial conditions and produces pulses with vanishing amplitudes and first derivatives at both initial and final times. Independent propagation, together with agreement between Haar-sampled state fidelities and the average gate fidelity, supports the gate implementations beyond the training states and avoids relying on the training loss as the sole measure of performance.

Under unitary dynamics, the Hadamard benchmark reaches an average gate infidelity of 8.49×10−88.49\times10^{-8}. For the

CX controls trained on S3S_{3}, the corresponding infidelities are 3.39×10−73.39 \times10^{-7}, 4.96×10−64.96 \times10^{-6}, and 1.17×10−61.17 \times10^{-6} for the XXXX, YYYY, and ZZZZ couplings, respectively. Within the training protocol considered, the interaction also affects how the local fields contribute to the learned solution: the XXXX and ZZZZ cases exhibit four dominant control components, whereas the YYYY solution uses all six. These observations characterize the obtained pulses rather than establish minimum control requirements for fundamental limits on the achievable fidelity. The extension to an exchange type XY Hamiltonian further illustrates how the same design procedure accommodates different combinations of local controls and fixed or independently controlled detunings.

The open system analysis distinguishes coherent gate accuracy from sensitivity to dissipation. Reusing the pulses obtained under unitary dynamics, we quantified the fidelity reduction induced by the specified dephasing and amplitude-damping channels. In the weak-dissipation regime, the numerical results reproduce the established first-order dependence on the dissipative rates [15, 16]. For a fixed channel and gate duration, the three CX coupling configurations exhibit the same leading-order trend, despite their different control profiles. Thus, a highly accurate coherent implementation does not by itself imply suppression of dissipative errors. These results provide a reference for assessing future optimizations that explicitly include noise in the training objective.

A complementary Chebyshev analysis provides compact representations of 139 scalar controls across 31 protocols. The minimum common coefficient count K∗=24K_* = 24 brings all eleven model/resource-family mean squared errors below 10−610^{-6}, with a largest family mean of 8.35×10−78.35 \times10^{-7}. This criterion applies to family averages. For independent dynamical validation, we retain K=30K = 30 coefficients per channel, yielding a largest model-averaged MSE of 3.56×10−83.56 \times10^{-8} and a maximum fit-induced gate infidelity of 1.25×10−101.25 \times10^{-10}. Joint square and Strang propagation preserve the continuous polynomial references within infidelity 10−510^{-5} for all 31 protocols at N=128N = 128 and all larger tested resolutions, under both sampling rules. For these methods and resolutions, target infidelity is ≤10−4\le10^{-4} for 27 of the 28 configurations comprising Hadamard and the four-/six-control two-qubit protocols. The remaining XY configuration (v), S2S_2, retains its larger baseline infidelity of approximately 1.56×10−31.56 \times10^{-3}. The three two-control cases remain subject to the symmetry-induced target-infidelity floor I≥0.6I \ge0.6.

Together, these results extend previous PINN-based gate-design studies [12] by combining gate synthesis through shared controls acting on multiple input states with a systematic characterization of interaction and local-field configurations. The explicit pulse boundary conditions, independently assessed gate accuracies, and quantified Chebyshev approximations connect the learning formulation to the properties of the resulting control waveforms. The dissipative analysis provides a quantitative baseline for distinguishing coherent synthesis errors from noise-induced infidelity. Future work should incorporate explicit amplitude and bandwidth constraints into the optimization and validate pulse implementation using calibrated amplitudes, timing, and transfer functions, allowing pulse complexity, physical constraints, measurement error, stochastic noise, and gate accuracy to be assessed together.

Acknowledgments

The authors remain responsible for the manuscript’s content. C.E.S. thanks Francisco González, Alejandro Gómez and Kevin Joven for fruitful discussions. L.F. and C.E.S. acknowledge support from the University of Córdoba (Grant No. FCB-10-25). A.M. acknowledges support from Universidad Nacional de Colombia, Medellín Campus (Grant Nos. 63067 and 67048). A.N. acknowledges support from Fondec y t Regular No. 1251131, Fondecyt Exploración No. 13250014, and Anillo Temático ATE 250066. We acknowledge the computational resources provided by the Quantum Ada workstation of the QSTATE group at the Department of Physics, Universidad Técnica Federico Santa María, Chile.

Data and code availability

Available from the corresponding authors upon reasonable request.

Additional CX gate validation and training analysis

To complement Section IV B, we present the Monte Carlo distribution of state infidelities for the CX controls shown in Figure 5. These distributions were computed using 10310^3 Haar-random initial states. The controls obtained for the xx and zz couplings yield lower sampled average infidelities, 3.38×10−73.38 \times10^{-7} and 1.15×10−61.15 \times10^{-6}, respectively. The yy coupling generally produces larger state infidelities, with a sampled average of 4.93×10−64.93 \times10^{-6} (Figure 11).

Monte Carlo distribution of CX state infidelities

Figure 11. Monte Carlo distribution of CX state infidelities. Distribution of p=log⁡10(1−F)p = \log_{10}(1-F) at the final evolution time TT, evaluated over Ns=103N_s = 10^3 Haar-random initial states for the couplings σx⊗σx\sigma_x \otimes\sigma_x (blue bars), σy⊗σy\sigma_y \otimes\sigma_y (magenta bars), and σz⊗σz\sigma_z \otimes\sigma_z (green bars).

We also examine the CX fidelity under the specified correlated two-qubit channels: pure dephasing with Lindblad operator Lz=σz⊗σzL_z = \sigma_z \otimes\sigma_z, and amplitude damping with operator L−=σ−⊗σ−L_- = \sigma_- \otimes\sigma_-. In the weak-dissipation regime (γkT≪1\gamma_k T \ll1), the first-order average gate fidelities for an ideal implementation, according to Eq. (21) [15, 16], are

Fz(E,O)=1−45γzT,F_z(\mathcal{E},O)=1-\frac{4}{5}\gamma_zT,
F−(E,O)=1−15γ−T.(35)F_-(\mathcal{E},O)=1-\frac{1}{5}\gamma_-T. \tag*{(35)}

Figure 12 shows the average CX fidelity over Ns=103N_s=10^3 random states as a function of the decay rate for the three coupling configurations. Panels (a) and (b) correspond to pure dephasing and amplitude damping, respectively. For each channel, the configurations exhibit similar dependence on the dissipation rate. In the weak-dissipation regime γT≪1\gamma T \ll1 shown in the insets, the numerical results reproduce the linear fidelity reduction predicted by Eq. (21). For operations confined to the computational subspace, this leading-order contribution depends on the specified dissipative channel and the system dimension, rather than on the implemented unitary operation. The different control profiles therefore do not suppress the leading-order dissipative error. For the operator normalizations and equal rates used here, pure dephasing causes a larger fidelity reduction than amplitude damping, consistent with the respective first-order coefficients. At larger rates, both channels progressively deviate from the linear approximation as higher-order contributions in γT\gamma T become significant; the deviation is more pronounced for pure dephasing.

Average CX fidelity under dissipative channels

Figure 12. Average CX fidelity under dissipative channels. Average fidelity evaluated using Eq. (17) for controls trained under unitary dynamics and propagated with pure dephasing (a) or amplitude damping (b), for the three qubit–qubit couplings. The decay rate varies over γ/J∈[0,10−1]\gamma/J \in[0,10^{-1}], where J=Jx=Jy=JzJ=J_x=J_y=J_z denotes the coupling strength used in the separate simulations. The insets show the weak-dissipation regime (γT≪1\gamma T \ll1); the dotted black curves represent the first-order fidelities Fz(E,O)=1−45γzTF_z(\mathcal{E},O)=1-\frac{4}{5}\gamma_zT and F−(E,O)=1−15γ−TF_-(\mathcal{E},O)=1-\frac{1}{5}\gamma_-T.

As in the Hadamard case, we also carry out the PINN robustness analysis for the CX gate in terms of optimizers, activation functions, loss metrics, and seeds. The same three optimization strategies were compared for CX training. In this case, L-BFGS yields the lowest gate infidelity, while the combined approach, which switches from Adam to L-BFGS after 20,000 epochs, yields the highest infidelity (Figure 13(a) and (e)). For the activation functions, SiLU, Mish, and GELU yield similar or lower gate infidelities than Sin (Figure 13(b)), although Sin retains the lowest training loss (panel (f)). In this case α=0.56\alpha=0.56 and β=0.44\beta=0.44 in the weighted SinTanh function. Huber and LogCosh loss metrics exhibit infidelities comparable to those obtained with MSE while MAE shows the worst case for both the infidelity and the loss function (Figure 13(c) and (g)). Finally, the multiple-seed training evidenced that more accurate (lower infidelities) scenarios might be achieved by changing the seed as shown in Figure 13(d), where most of the considered seeds exhibit lower infidelity values than those obtained with seed 0, which was used in the main text, with basically the same loss (panel h).

Sensitivity of the PINN training for the CX gate

Figure 13. Sensitivity of the PINN training for the CX gate. Results are shown for the σx⊗σx\sigma_x \otimes\sigma_x coupling. Panels (a)–(d) show the average gate infidelity for different optimizers, activation functions, loss metrics, and random seeds, respectively, with the remaining training parameters fixed. Panels (e)–(h) show the corresponding total training losses. The standard deviation across seeds is 1.07×10−71.07 \times10^{-7}.

Validation on the set of training states. The other two sets of states S1S_1 and S2S_2 were also used to carry out additional PINN experiments as a complement to the control functions reported in the main text for the set S3S_3. Figure 14 shows the shape of the control functions in terms of each considered coupling and each set of training states S1S_1 (left column) and S2S_2 (right column). Panels (g) and (h) show the corresponding total loss function. Infidelity values similar to those reported in the main text were obtained for these two setups, validating our results. Furthermore, considering S1S_1 as the training set and taking S3S_3 as the testing set yields the sampled average state infidelities Iavg=1.2×10−6I_{\mathrm{avg}}=1.2\times10^{-6} for σx⊗σx\sigma_x\otimes\sigma_x, Iavg=9.05×10−6I_{\mathrm{avg}}=9.05\times10^{-6} for σy⊗σy\sigma_y\otimes\sigma_y, and Iavg=8.37×10−7I_{\mathrm{avg}}=8.37\times10^{-7} for σz⊗σz\sigma_z\otimes\sigma_z. All values are comparable with those in the training/testing experiment in Figure 7, thus confirming the robustness of the PINN-predicted control functions.

Control functions and loss for sets $\mathcal{S}_1$ and $\mathcal{S}_2$

Figure 14. Control functions and loss for sets S1\mathcal{S}_1 and S2\mathcal{S}_2. Shape of the control function when sets S1\mathcal{S}_1 (left column) and S2\mathcal{S}_2 (right column) are used in the PINN training. The same coupling setups σx⊗σx\sigma_x \otimes\sigma_x (a) and (b), σy⊗σy\sigma_y \otimes\sigma_y (c) and (d), σz⊗σz\sigma_z \otimes\sigma_z (e) and (f) are considered. (g) and (h) show the corresponding total loss function for each coupling.

A natural question that arises from our control function analysis is about the number of controls needed to achieve such a high-fidelity accuracy. To tackle this issue, we run experiments with only four and two control functions which are considered to be transverse with respect to the coupling. Figure 15 shows the behavior of the control functions when considering four (top) and two (bottom) transversal control functions. It is worth noting that similar high-fidelity values are possible in the former case, with four controls (we got slightly higher infidelity values with respect to the six-control setup). From an experimental viewpoint, this is a reasonable accuracy–resource tradeoff to bear in mind. However, the latter case with only two controls does not achieve good fidelity values.

Sensitivity of Hadamard gate training

Here, we present the complete training loss for the Hadamard result shown in the main text and analyze the sensitivity of our PINN architecture to the optimizer, activation function, loss metric, and random seed. Numerical calculations were performed on the Quantum Ada workstation of the QSTATЕ group at Universidad Técnica Federico Santa María, Chile, equipped with an AMD Ryzen 9 9900X processor, 128 GB of system RAM, and an NVIDIA GeForce RTX 5090 GPU with 32 GB of device memory. The quantum dynamics and gate infidelities were evaluated using QuTiP version 4.7.5. Both the dynamical evolution and the computation of the unitary propagator U(T)U(T) used absolute (atol =10−13= 10^{-13}) and relative (rtol =10−12= 10^{-12}) tolerances.

PINN loss function for the Hadamard gate. Figure 16 shows the total loss and its individual components as functions of the training epoch. The total loss (solid blue line) decreases rapidly during the initial epochs and then slowly approaches a final value dominated by regularization. The losses associated with the physical model (solid red line), the target gate (solid green line), and the density-matrix trace constraint (solid cyan line) decrease throughout training, reaching final values approximately two to four orders of magnitude below the regularization term.

Total loss function and its partial components for the Hadamard gate

Figure 16. Total loss function and its partial components for the Hadamard gate.

Optimizers. Three optimization strategies were compared: Adam, L-BFGS, and their combination (Adam–L-BFGS), which uses Adam during the first 6000 epochs and L-BFGS for the remaining epochs [43]. Although Adam–L-BFGS achieves the lowest Hadamard gate infidelity (Figure 17(a)), L-BFGS reaches the lowest training loss (panel (e)). The main-text results use Adam, which provides stable training for both the Hadamard and CX gates.

Eight-panel sensitivity plots showing final gate infidelity and total training loss for different optimizers, activation functions, loss metrics, and random seeds

Figure 17. Sensitivity of PINN training for the Hadamard gate. Final gate infidelity for different (a) optimizers, (b) activation functions, (c) loss metrics, and (d) random seeds. Panels (e)–(h) show the total training loss for the corresponding upper panels.

Activation functions. Eight activation functions were compared: Sin, Tanh, SiLU, ELU, Mish, GELU, Leaky ReLU (LReLU), and the weighted combination SinTanh =α= \alpha Sin +β+ \beta Tanh, where α\alpha and β\beta are trainable parameters. As shown in Figure 17(b) and (f), the Sin activation function used in the main text yields the lowest infidelity and total loss. For SinTanh, the learned weights are α=0.72\alpha= 0.72 and β=0.28\beta= 0.28.

Loss metrics. In addition to the mean squared error (MSE) used in the main text, we evaluated the mean absolute error (MAE), Huber loss (with δ=1\delta= 1), and Log-Cosh loss. None of these alternatives yields a lower gate infidelity than MSE, while Huber and Log-Cosh exhibit similar loss convergence (Figure 17(c) and (g)).

Seeds. Sensitivity to the initialization of the network parameters was evaluated using the eleven-seed set Sseed={0,1,2,…,10}S_{\mathrm{seed}} = \{0,1,2,\ldots,10\}. Most runs yield infidelities below 10−610^{-6}, with seeds 0 and 1 giving the lowest values (Figure 17(d)). The training losses show similar convergence across seeds, as illustrated in panel (h). Seed 0 was used for the main-text results.

Dissipative behavior of the XY coupling PINN average fidelity

Figure 18 shows the dissipative behavior of the CX gate under the XY coupling, averaged over Ns=103N_s = 10^3 random states. Panels (a) and (b) correspond to pure dephasing and amplitude damping for configurations (i)–(v). Because the system dimension and Lindblad operators are the same as in the individual-coupling analysis, Eq. (21) predicts the same leading-order coefficients in the weak-dissipation regime γT≪1\gamma T \ll1. The insets reproduce these linear fidelity reductions. Beyond this regime, the five configurations retain qualitatively similar behavior, with differences becoming more visible as the decay rate increases. Within the rates and channels studied, the distinct control profiles and detunings therefore produce similar dissipative fidelity curves; this observation does not imply that the controls suppress decoherence.

Average CX fidelity for the XY Hamiltonian configurations

Figure 18. Average CX fidelity for the XY Hamiltonian configurations (i)–(v). Control functions trained under unitary dynamics are propagated with pure dephasing (a) and amplitude damping (b) as the decay rate varies over γ/g∈[0,0.1]\gamma/g \in[0, 0.1]. The insets show the weak-dissipation regime (γT≪1\gamma T \ll1), with the first-order predictions Fz(E,O)F_z(\mathcal{E},\mathcal{O}) and F−(E,O)F_-(\mathcal{E},\mathcal{O}) given in Eq. (35).

We also repeated the dissipative analysis for both Hadamard and CX using Ns=2×104N_s = 2 \times10^4 random states at each decay rate. The resulting average fidelity values are basically unchanged with respect to those obtained with Ns=103N_s = 10^3, both in the weak-dissipation regime and over the full range of rates considered. This agreement indicates stability of the Monte Carlo fidelity estimates with respect to the sample size.

Additional controls for S1S_1 and S2S_2 are included in the compact-representation analysis of Sec. V. The choice of training set affects gate accuracy: in particular, the larger baseline infidelity of XY configuration (v) trained on S2S_2 is reported there.

Seeds. Sensitivity to the initialization of the net-

References

References

  1. [1]M. Y. Niu, S. Boixo, V. N. Smelyanskiy, and H. Neven, Universal quantum control through deep reinforcement learning, npj Quantum Information 5, 33 (2019).arxiv.org/abs/1803.01857
  2. [2]Z. Chen, W. Liu, Y. Ma, W. Sun, R. Wang, H. Wang, H. Xu, G. Xue, H. Yan, Z. Yang, J. Ding, Y. Gao, F. Li, Y. Zhang, Z. Zhang, Y. Jin, H. Yu, J. Chen, and F. Yan, Efficient implementation of arbitrary two-qubit gates using unified control, Nature Physics 21, 1489 (2025).DOI
  3. [3]N. Khaneja, T. Reiss, C. Kehlet, T. Schulte-Herbrüggen, and S. J. Glaser, Optimal control of coupled spin dynamics: design of NMR pulse sequences by gradient ascent algorithms, Journal of magnetic resonance 172, 296 (2005).pubmed.ncbi.nlm.nih.gov/15649756
  4. [4]T. Caneva, T. Calarco, and S. Montangero, Chopped random-basis quantum optimization, Phys. Rev. A 84, 022326 (2011).DOI
  5. [5]B. Riaz, C. Shuang, and S. Qamar, Optimal control methods for quantum gate preparation: a comparative study, Quantum Information Processing 18, 100 (2019).DOI
  6. [6]M. Raissi, P. Perdikaris, and G. E. Karniadakis, Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations, Journal of Computational Physics 378, 686 (2019).DOI
  7. [7]G. E. Karniadakis, I. G. Kevrekidis, L. Lu, P. Perdikaris, S. Wang, and L. Yang, Physics-informed machine learning, Nature Reviews Physics 3, 422 (2021).DOI
  8. [8]S. Cai, Z. Mao, Z. Wang, M. Yin, and G. E. Karniadakis, Physics-informed neural networks (pinns) for fluid mechanics: a review, Acta Mechanica Sinica 37, 1727 (2021).arxiv.org/abs/2105.09506
  9. [9]E. Haghighat, M. Raissi, A. Mourel, H. Gomez, and R. Juanes, A physics-informed deep learning framework for inversion and surrogate modeling in solid mechanics, Computer Methods in Applied Mechanics and Engineering 379, 113741 (2021).DOI
  10. [10]J. Guo, H. Zhu, Y. Yang, and C. Guo, Advances in physics-informed neural networks for solving complex partial differential equations and their engineering applications: A systematic review, Engineering Applications of Artificial Intelligence 161, 112044 (2025).DOI
  11. [11]U. Güngördü and J. P. Kestner, Robust quantum gates using smooth pulses and physics-informed neural networks, Phys. Rev. Res. 4, 023155 (2022).DOI
  12. [12]S. Lauten and M. Otten, Physics-informed neural networks for gate design using quantum optimal control (2025), arXiv:2511.09463 [quant-ph].arxiv.org/abs/2511.09463
  13. [13]A. Norambuena, M. Mattheakis, F. J. González, and R. Coto, Physics-informed neural networks for quantum control, Phys. Rev. Lett. 132, 010801 (2024).DOI
  14. [14]T. Fösеl, P. Tighineanu, T. Weiss, and F. Marquardt, Reinforcement learning with neural networks for quantum feedback, Phys. Rev. X 8, 031084 (2018).
  15. [15]T. Abad, J. Fernández-Pendás, A. Frisk Kockum, and G. Johansson, Universal fidelity reduction of quantum operations from weak dissipation, Physical Review Letters 129, 150504 (2022).DOI
  16. [16]T. Abad, Y. Schattner, A. F. Kockum, and G. Johansson, Impact of decoherence on the fidelity of quantum gates leaving the computational subspace, Quantum 9, 1684 (2025).DOI
  17. [17]M. E. F. Fernandes, F. F. Fanchini, F. F. de Lima, and L. K. Castelano, Effectiveness of the krotov method in finding controls for open quantum systems, Journal of Physics A: Mathematical and Theoretical 56, 495303 (2023).DOI
  18. [18]J. L. Dodd, M. A. Nielsen, M. J. Bremner, and R. T. Thew, Universal quantum computation and simulation using any entangling hamiltonian and local unitaries, Phys. Rev. A 65, 040301(R) (2002).DOI
  19. [19]M. A. Nielsen and I. L. Chuang, Quantum computation and quantum information (Cambridge university press, 2010).
  20. [20]K. Hornik, Approximation capabilities of multilayer feed-forward networks, Neural networks 4, 251 (1991).
  21. [21]J. Zopes, K. Sasaki, K. S. Cujia, J. M. Boss, K. Chang, T. F. Segawa, K. M. Itoh, and C. L. Degen, High-resolution quantum sensing with shaped control pulses, Phys. Rev. Lett. 119, 260501 (2017).DOI
  22. [22]S. J. Evered, D. Bluvstein, M. Kalinowski, S. Ebadi, T. Manovitz, H. Zhou, S. H. Li, A. A. Geim, T. T. Wang, N. Maskara, et al., High-fidelity parallel entangling gates on a neutral-atom quantum computer, Nature 622, 268 (2023).DOI
  23. [23]A. Zhao, D. Fattahi, and X. Hu, Physics-informed neural networks for physiological signal processing and modeling: a narrative review, Physiol. Meas. 46, 07TR02 (2025).DOI
  24. [24]M. H. Goerz, D. M. Reich, and C. P. Koch, Optimal control theory for a unitary operation under dissipative evolution, New Journal of Physics 16, 055012 (2014).
  25. [25]D. M. Reich, G. Gualdi, and C. P. Koch, Minimum number of input states required for quantum gate characterization, Physical Review A—Atomic, Molecular, and Optical Physics 88, 042309 (2013).DOI
  26. [26]J. R. Johansson, P. D. Nation, and F. Nori, Qutip: An open-source python framework for the dynamics of open quantum systems, Computer physics communications 183, 1760 (2012).
  27. [27]K. Zyczkowski and H.-J. Sommers, Average fidelity between random quantum states, Phys. Rev. A 71, 032313 (2005).DOI
  28. [28]M. A. Nielsen, A simple formula for the average gate fidelity of a quantum dynamical operation, Physics Letters A 303, 249 (2002).DOI
  29. [29]E. Knill, Non-binary unitary error bases and quantum codes, arXiv preprint quant-ph/9608048 (1996).arxiv.org/abs/quant-ph/9608048
  30. [30]S. Kuznetsov and E. R. Loubenets, Modelling optimal generation of an arbitrary n-qubit quantum gate within the generalized bloch vectors formalism due to the pontryagin principle (2025), arXiv:2509.18059 [quant-ph].arxiv.org/abs/2509.18059
  31. [31]A. H. da Silva, L. K. Castelano, and R. d. J. Napolitano, Monte carlo approach for finding optimally controlled quantum gates with differential geometry, Phys. Rev. A 112, 052603 (2025).DOI
  32. [32]J. Majer, J. M. Chow, J. M. Gambetta, J. Koch, B. R. Johnson, J. A. Schreier, L. Frunzio, D. I. Schuster, A. A. Houck, A. Wallraff, A. Blais, M. H. Devoret, S. M. Girvin, and R. J. Schoelkopf, Coupling superconducting qubits via a cavity bus, Nature 449, 443 (2007).DOI
  33. [33]B. Yan, S. A. Moses, B. Gadway, J. P. Covey, K. R. A. Hazzard, A. M. Rey, D. S. Jin, and J. Ye, Observation of dipolar spin-exchange interactions with lattice-confined polar molecules, Nature 501, 521 (2013).
  34. [34]D. Barredo, H. Labuhn, S. Ravets, T. Lahaye, A. Browaeys, and C. S. Adams, Coherent excitation transfer in a spin chain of three rydberg atoms, Phys. Rev. Lett. 114, 113002 (2015).pubmed.ncbi.nlm.nih.gov/25839265
  35. [35]D. M. Abrams, N. Didier, B. R. Johnson, M. P. Da Silva, and C. A. Ryan, Implementation of the xy interaction family with calibration of a single pulse, Nature Electronics 3, 744 (2020).DOI
  36. [36]J. H. Reina, C. E. Susa, and R. Hildner, Conditional quantum dynamics and nonlocal states in dimeric and trimeric arrays of organic molecules, Phys. Rev. A 97, 063422 (2018).DOI
  37. [37]Qblox, Qblox Scheduler: Hello quantum world, Online documentation (n.d.), accessed 30 October 2026.
  38. [38]Quantify / Quantify-OS, Quantify Scheduler 0.28.1: Pulse library API, Online documentation (n.d.), accessed 30 October 2026.
  39. [39]Quantum Machines, Timing in QUA: Minimum pulse and wait durations, Online documentation, version 1.4.1 (n.d.), accessed 30 October 2026. QUA API: https://docs.quantum-machines.co/1.4.1/docs/API_references/qua/dsl_main/.
  40. [40]Zurich Instruments, LabOne Q: Experiment and pulse library API, Online documentation (n.d.), accessed 30 October 2026.
  41. [41]Qblox, Control sequencers: Waveform playback, Online documentation (n.d.), accessed 30 October 2026. See also The Q1 Sequencer, https://docs.qblox.com/en/main/products/architectures/sequencers/sequencer.html.
  42. [42]Zurich Instruments, HDAWG user manual: Specifications, Online documentation (n.d.), accessed 30 October 2026. Playback architecture: https://docs.zhinst.com/hdawg_user_manual/functional-description/specific/awg_architecture.html.
  43. [43]P. Rathore, W. Lei, Z. Erangella, L. Lu, and M. Udell, Challenges in training pinns: A loss landscape perspective, arXiv preprint arXiv:2402.01868 (2024).arxiv.org/abs/2402.01868

Paper details

vlnc:W_2ebpqata
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Physics and Astronomy

Not recorded for this paper · View statement →

Looking for related papers…
Contents