A heat pump device comprising: a compressor having a compression mechanism for compressing a refrigerant; a motor that actuates the compression mechanism of the compressor; an inverter that applies a predetermined voltage to the motor; and an inverter control unit that controls the inverter, characterized in that the inverter control unit includes: a phase switching unit that switches between a phase θp and a phase θn different from the phase θp substantially by 180 degrees and outputs one of them as a phase of a voltage command value of the inverter in synchronization with a reference signal having a frequency higher than an operation frequency at the time of a compression operation of the motor; - an amplitude output unit that outputs an amplitude of the voltage command value; - a voltage-command generation unit that generates and outputs the voltage command value based on the phase outputted by the phase switching unit and the output amplitude of the amplitude output unit; - a voltage-command correction unit that corrects the voltage command value so that a DC current flowing in the motor becomes substantially zero; and - a drive-signal generation unit that generates a drive signal of the inverter based on the output of the voltage-command correction unit. a compressor having a compression mechanism for compressing a refrigerant; a motor that actuates the compression mechanism of the compressor; an inverter that applies a predetermined voltage to the motor; and an inverter control unit that controls the inverter, characterized in that the inverter control unit includes: a phase switching unit that switches between a phase θp and a phase θn different from the phase θp substantially by 180 degrees and outputs one of them as a phase of a voltage command value of the inverter in synchronization with a reference signal having a frequency higher than an operation frequency at the time of a compression operation of the motor; - an amplitude output unit that outputs an amplitude of the voltage command value; - a voltage-command generation unit that generates and outputs the voltage command value based on the phase outputted by the phase switching unit and the output amplitude of the amplitude output unit; - a voltage-command correction unit that corrects the voltage command value so that a DC current flowing in the motor becomes substantially zero; and - a drive-signal generation unit that generates a drive signal of the inverter based on the output of the voltage-command correction unit. a phase switching unit that switches between a phase θp and a phase θn different from the phase θp substantially by 180 degrees and outputs one of them as a phase of a voltage command value of the inverter in synchronization with a reference signal having a frequency higher than an operation frequency at the time of a compression operation of the motor; - an amplitude output unit that outputs an amplitude of the voltage command value; - a voltage-command generation unit that generates and outputs the voltage command value based on the phase outputted by the phase switching unit and the output amplitude of the amplitude output unit; - a voltage-command correction unit that corrects the voltage command value so that a DC current flowing in the motor becomes substantially zero; and - a drive-signal generation unit that generates a drive signal of the inverter based on the output of the voltage-command correction unit.