A deque is implemented with 3 stacks. one for the head, one for the tail and one is always empty. Pushing is therefor O(1), light popping (in case the head/tail respectively aren't empty) is also O(1). A 'heavy pop' is in a scenario when we have k elements, only in 1 stack and we wish to pop the other stack. For example, n elements in head and we want to pop the tail. In this case, we push all elements from head stack to the empty stack, than push n/2 elements to the tail and the remaining n/2 back to the head.
I'm having troubles finding the potential function for this solution, or the amortized value for that case. If I define the potential function to be the number of current elements in the deque, I get linear time. I don't know if this is true but I feel like it's not.