Is this rook sacrifice intended? rnbqk2r/p1pp1pbp/1p2p1pn/4P3/2BP4/5Q2/PPP2PPP/RNB1K1NR w KQkq - 0 1


Is the rook sacrifice intended by the black to trap white's queen or is it just a misplayed move?
In general, it's very hard to trap a queen like that. After Qxa8 Nc6, the white queen can't escape immediately but it's not hard to devise an escape plan; with Bb5 White threatens to exchange the only defender of the a7 pawn, and at the same time winning another pawn on c6. So my conclusion is that Black's last move was a blunder.