As others have mentioned, you must use carbon rim brake pads on carbon rims with carbon braking surfaces.
One of the main reasons is that carbon rims have a lower thermal capacity than aluminum rims. That is, carbon rims will heat up much quicker than aluminum rims under prolonged braking. This article by Bicycling Magazine interviewed Christian Heuele, a representative of SwissStop, which makes various brake pads. Heuele reported that they designed the carbon pads to operate at up to 320 degrees Celsius, versus 180 degrees C for aluminum rim pads.
The carbon rim pads also have a much harder rubber, and they don't brake well on alloy rims. Logically, we might expect pads for aluminum rims to also not brake very well on carbon up to their normal operating temperature limits (which, remember, are a lot lower than the carbon pads!!).
Additionally, brake pads used on aluminum rims can sometimes have aluminum fragments embedded in them, particularly if they're cheaper brake pads. This would damage the carbon rim. This point is rather moot for the question, as you should be changing the pads anyway, and you should not be using the same pad type on different rims.
I tried a set of carbon rims (with carbon pads!!!) in the early 2000s, and the braking was rather grabby and it wasn't that strong overall. The brake performance of good carbon rims has improved significantly since then, but the inherent limitations of carbon do mean that aluminum is a better brake surface. I would normally urge rim brake riders to strongly consider sticking to aluminum braking surfaces - this can entail mid-depth alloy clinchers or deep section hybrid rims (alloy brake track and structure, with a non-structural aerodynamic carbon fairing bonded on). However, this is a point on which reasonable adults can differ, and a good carbon rim should be usable by most riders who want one. Many good carbon rims may have textured braking surfaces, like the Zipp rims shown in the Cyclingtips article I just linked.