Preheat your oven to 350°F (175°C). Grease a 9-inch pie pan.
In a large mixing bowl, combine the flour, sugar, cocoa powder, baking powder, and salt. Mix well.
Add the melted butter, eggs, and vanilla extract to the dry ingredients. Stir until just combined. The batter will be thick.
Fold in the chocolate chips and walnuts (if using).
Pour the batter into the prepared pie pan and spread it evenly.
Bake for 25-30 minutes, or until the edges are set but the center is still slightly gooey.
Remove from the oven and let it cool for about 10 minutes. Serve warm with a dollop of heavy cream and a drizzle of chocolate syrup.