  We demonstrate the full functionality of a circuit that generates single
microwave photons on demand, with a wave packet that can be modulated with a
near-arbitrary shape. We achieve such a high tunability by coupling a
superconducting qubit near the end of a semi-infinite transmission line. A dc
superconducting quantum interference device shunts the line to ground and is
employed to modify the spatial dependence of the electromagnetic mode structure
in the transmission line. This control allows us to couple and decouple the
qubit from the line, shaping its emission rate on fast time scales. Our
decoupling scheme is applicable to all types of superconducting qubits and
other solid-state systems and can be generalized to multiple qubits as well as
to resonators.
