Quantum delegated and federated learning via quantum homomorphic encryption