  As the size and complexity of a quantum computer increases, quantum bit
(qubit) characterization and gate optimization become complex and
time-consuming tasks. Current calibration techniques require complicated and
verbose measurements to tune up qubits and gates, which cannot easily expand to
the large-scale quantum systems. We develop a concise and automatic calibration
protocol to characterize qubits and optimize gates using QubiC, which is an
open source FPGA (field-programmable gate array) based control and measurement
system for superconducting quantum information processors. We propose
mutli-dimensional loss-based optimization of single-qubit gates and full
XY-plane measurement method for the two-qubit CNOT gate calibration. We
demonstrate the QubiC automatic calibration protocols are capable of delivering
high-fidelity gates on the state-of-the-art transmon-type processor operating
at the Advanced Quantum Testbed at Lawrence Berkeley National Laboratory. The
single-qubit and two-qubit Clifford gate infidelities measured by randomized
benchmarking are of $4.9(1.1) \times 10^{-4}$ and $1.4(3) \times 10^{-2}$,
respectively.
