This book provides a general and powerful definition of homotopy algebraic quantum field theory and homotopy prefactorization algebra using a new coend definition of the Boardman-Vogt construction for a colored operad. All of their homotopy coherent structures are explained in details, along with a comparison between the two approaches at the operad level. With chapters on basic category theory, trees, and operads, this book is self-contained and...