As long as your tasks are completed while at work, you dont have to be at work. Thats basically how my job works right now.
Which, IMO, makes perfect sense. "Oh, you've completed your project ahead of time and exceeded quality? You should probably sit around for another four hours twiddling your thumbs because we don't have anything else to give you right now."