  As quantum information processors grow in quantum bit (qubit) count and
functionality, the control and measurement system becomes a limiting factor to
large scale extensibility. To tackle this challenge and keep pace with rapidly
evolving classical control requirements, full control stack access is essential
to system level optimization. We design a modular FPGA (field-programmable gate
array) based system called QubiC to control and measure a superconducting
quantum processing unit. The system includes room temperature electronics
hardware, FPGA gateware, and engineering software. A prototype hardware module
is assembled from several commercial off-the-shelf evaluation boards and
in-house developed circuit boards. Gateware and software are designed to
implement basic qubit control and measurement protocols. System functionality
and performance are demonstrated by performing qubit chip characterization,
gate optimization, and randomized benchmarking sequences on a superconducting
quantum processor operating at the Advanced Quantum Testbed at Lawrence
Berkeley National Laboratory. The single-qubit and two-qubit process fidelities
are measured to be 0.9980$\pm$0.0001 and 0.948$\pm$0.004 by randomized
benchmarking. With fast circuit sequence loading capability, the QubiC performs
randomized compiling experiments efficiently and improves the feasibility of
executing more complex algorithms.
