The general Lagrange-Euler formalism for the three memory circuit elements, namely, memristive, memcapacitive, and meminductive systems, is introduced. In addition, mutual meminductance, i.e. mutual inductance with a state depending on the past evolution of the system, is defined. The Lagrange-Euler formalism for a general circuit network, the related work-energy theorem, and the generalized Joule's first law are also obtained. Examples of this formalism applied to specific circuits are provided, and the corresponding Hamiltonian and its quantization for the case of non-dissipative elements are discussed. The notion of memory quanta, the quantum excitations of the memory degrees of freedom, is presented. Specific examples are used to show that the coupling between these quanta and the well-known charge quanta can lead to a splitting of degenerate levels and to other experimentally observable quantum effects.