Method for controlling a powertrain for a motor vehicle, the powertrain comprising: - a heat engine which comprises: - an engine block which delimits cylinders and is provided with a crankshaft, - an intake line for the admission of fresh air into the cylinders, - an exhaust line for discharging burnt gases from the cylinders, comprising a treatment means for treating the burnt gases, - a turbocharger which comprises a turbine mounted in the exhaust line, a main compressor mounted in the intake line, and means for unloading said turbine, - an electric compressor which is mounted in the intake line and is driven by an electric motor connected to said accumulator battery, - an electrical machine which is coupled to the crankshaft of the heat engine and is connected to an accumulator battery, and which is reversible such that it can operate in either motor or generator mode, the control method being characterized in that a propulsive torque required to propel the motor vehicle is acquired, together with the temperature (θ) of the burnt gases, and then, • if the acquired temperature (θ) is below a target temperature (θ 0): a) the heat engine is made to operate so as to develop a thermal torque (Ct) which is greater than the propulsive torque, b) the electrical machine is made to operate in generator mode so that it absorbs the difference between the thermal torque (Ct) and the propulsive torque, c) the electric compressor is made to operate in such a way that it compresses the fresh air, and d) the turbine is unloaded, using the unloading means, and • if the acquired temperature (θ) is greater than or equal to the target temperature (θ 0): - the heat engine is made to operate so as to develop a thermal torque (Ct) which is less than the propulsive torque, and - the electrical machine is made to operate in motor mode so that it compensates for the difference between the propulsive torque and the thermal torque (Ct). - a heat engine which comprises: - an engine block which delimits cylinders and is provided with a crankshaft, - an intake line for the admission of fresh air into the cylinders, - an exhaust line for discharging burnt gases from the cylinders, comprising a treatment means for treating the burnt gases, - a turbocharger which comprises a turbine mounted in the exhaust line, a main compressor mounted in the intake line, and means for unloading said turbine, - an electric compressor which is mounted in the intake line and is driven by an electric motor connected to said accumulator battery, - an engine block which delimits cylinders and is provided with a crankshaft, - an intake line for the admission of fresh air into the cylinders, - an exhaust line for discharging burnt gases from the cylinders, comprising a treatment means for treating the burnt gases, - a turbocharger which comprises a turbine mounted in the exhaust line, a main compressor mounted in the intake line, and means for unloading said turbine, - an electric compressor which is mounted in the intake line and is driven by an electric motor connected to said accumulator battery, - an electrical machine which is coupled to the crankshaft of the heat engine and is connected to an accumulator battery, and which is reversible such that it can operate in either motor or generator mode, the control method being characterized in that a propulsive torque required to propel the motor vehicle is acquired, together with the temperature (θ) of the burnt gases, and then, • if the acquired temperature (θ) is below a target temperature (θ 0): a) the heat engine is made to operate so as to develop a thermal torque (Ct) which is greater than the propulsive torque, b) the electrical machine is made to operate in generator mode so that it absorbs the difference between the thermal torque (Ct) and the propulsive torque, c) the electric compressor is made to operate in such a way that it compresses the fresh air, and d) the turbine is unloaded, using the unloading means, and • if the acquired temperature (θ) is greater than or equal to the target temperature (θ 0): • if the acquired temperature (θ) is below a target temperature (θ 0): a) the heat engine is made to operate so as to develop a thermal torque (Ct) which is greater than the propulsive torque, b) the electrical machine is made to operate in generator mode so that it absorbs the difference between the thermal torque (Ct) and the propulsive torque, c) the electric compressor is made to operate in such a way that it compresses the fresh air, and d) the turbine is unloaded, using the unloading means, and a) the heat engine is made to operate so as to develop a thermal torque (Ct) which is greater than the propulsive torque, b) the electrical machine is made to operate in generator mode so that it absorbs the difference between the thermal torque (Ct) and the propulsive torque, c) the electric compressor is made to operate in such a way that it compresses the fresh air, and d) the turbine is unloaded, using the unloading means, and • if the acquired temperature (θ) is greater than or equal to the target temperature (θ 0): - the heat engine is made to operate so as to develop a thermal torque (Ct) which is less than the propulsive torque, and - the electrical machine is made to operate in motor mode so that it compensates for the difference between the propulsive torque and the thermal torque (Ct).