Take the door off and trim 10 -15mm off the bottom and then put it back. trim the carpet to a nice neat edge, though it doesn't look the best to start with, but then that's your choice. Once you've got a nice clean edge, put a threshold down that fits over the carpet edge, something like this...