Classical computation is modular. It exploits plug n' play architectures which allow us to use prefabricated circuits without knowing their construction. This bestows advantages such as allowing parts of the computational process to be outsourced, and permitting individual circuit components to be exchanged and upgraded. Here, we introduce a formal framework to describe modularity in the quantum regime. We demonstrate a 'no-go' theorem, stipulating that it is not always possible to make use of quantum circuits without knowing their construction. This has significant consequences for quantum algorithms, forcing the circuit implementation of certain quantum algorithms to be rebuilt almost entirely from scratch after incremental changes in the problem-such as changing the number being factored in Shor's algorithm. We develop a workaround capable of restoring modularity, and apply it to design a modular version of Shor's algorithm that exhibits increased versatility and reduced complexity. In doing so we pave the way to a realistic framework whereby 'quantum chips' and remote servers can be invoked (or assembled) to implement various parts of a more complex quantum computation.repository of external servers, each specialized in executing specific quantum algorithms on supplied input. To what extent can a client, Alice, construct a universal device that invokes such a server -much as one invokes built-in functions on Mathematica-such that her device automatically performs a computation [ ] U , whenever the server's algorithm transforms an input fñThis question is particularly important for a prominent class of quantum algorithms that encompasses quantum factoring, solution of linear equations, and the DQC1 (the power of one bit of quantum information) algorithm for evaluating the normalized trace of unitary matrices [4][5][6][7][8][9][10][11]. These algorithms share the common property that their classical input x is encoded within a suitable unitary operator U x . Quantum speed-up explicitly exploits the property that U x can scale exponentially, and yet still be represented by a polynomial sized quantum circuit. The algorithm then operates by realizing some U x -dependent complex quantum process [ ] U x , whose output statistics compute some desired function f (x).Modularity is naturally desirable as each input x requires a different operator U x . A naive synthesis of [ ] U x would involve creating a different quantum circuit for each possible input which is far from ideal. Could Alice adopt a more modular approach? One may envision a series of different black-boxes, each promising to output fñ | U when given input fñ | . Can Alice then construct some fixed 'plug n' play device', such that by 'plugging in' a black-box that implements a specific U x , her device computes [ ] U x (see figure 1)? If possible, such a device is clearly advantageous. Different laboratories could engineer implementations of different U x that exploit the advantages of specific physical realizations; which can then be interchanged free...