  Classical and quantum machine learning are being increasingly applied to
various tasks in quantum information technologies. Here, we present an
experimental demonstration of quantum control using a physics-informed neural
network (PINN). PINN's salient feature is how it encodes the entire control
sequence in terms of its network parameters. This feature enables the control
sequence to be later adopted to any hardware with optimal time discretization,
which contrasts with conventional methods involving a priory time
discretization. Here, we discuss two important quantum information tasks: gate
synthesis and state preparation. First, we demonstrate quantum gate synthesis
by designing a two-qubit CNOT gate and experimentally implementing it on a
heteronuclear two-spin NMR register. Second, we demonstrate quantum state
preparation by designing a control sequence to efficiently transfer the thermal
state into the long-lived singlet state and experimentally implement it on a
homonuclear two-spin NMR register. We present a detailed numerical analysis of
the PINN control sequences regarding bandwidth, discretization levels, control
field errors, and external noise.
