(...) tunnelling to Mars’ core and liquefying it, after which the planet’s rotation would generate a magnetic field like earth does.
There are many good ideas such as this in World Building.SE. What I love about them is that most would lead to planetary obliteration and this one is no exception :) So instead of telling you how to tunnel to the core, I will do a frame challenge by assuming it is easily possible to do so. And why you DON'T want to do that.
Mostly every substance has different densities at different phases of matter. And for metals such as iron and nickel, which make the bulk of Mars's core, the molten phase is less dense than the solid one - on top of being able to flow.
In plain terms: you dig a hole to the core and make it liquid, it will expand. If it is not able to, you will just get a hotter solid. And the only way to expand is through the tunnel, so that molten iron and nickel is going to come up like lava going up a volcano. Depending on how you do it, you might get either a slow, steady flow like a Hawaiian volcano; Or you can use Mars's lower gravity and practical lack of an atmosphere to one-up Krakatoa, possibly knock some unlucky spaceships out of the solar system altogether.
Then you are left with less core. Even if the remaining material still occupies the same volume, it will not offer the same resistance to basically the weight of a planet on top of it. I don't have the math in me, but whether it puts greater or lesser pressure on the layers above it, the whole mantle and crust of Mars will shift. A little less core and you can break the crust into plates... A lot of core and you end up with a molten rock, smaller than Mars, that will eventually cool down into a new planet in a few hundred million years.
And then there is my favorite part about this plan. The core of Mars is two orders of magnitude more massive than the whole asteroid belt combined, which means that if even just 1% of it comes out (on top of all the rocks you excavated to get there), you have enough material to build a few dwarf planets. There is also enough ore in the rock you dug to disrupt the economy of the Earth for lifetimes, so selling it is not really an option if you're still living in capitalism. Unless you are collecting material to build a Dyson sphere there is just no sane way to dispose of all that rock, which makes me think of this scene from Disenchanted:
-Trøgs have been excavating for generations. We'll keep it up until the whole world is hollow. If you have any questions, feel free to ask the happy miners.
-Where do you put the rocks you excavate?
-We have another cave we excavated for rock storage.
-Then where did you put the rock you excavated from that cave?
-What are you, the rock police? I put 'em up my ass. How's that?
If you still want to get to the core: the biggest hurdle we have nowadays is that we dig with drills, and our drill bits just don't work past a certain depth due to temperature and density of the rock. It ends up that the rock you excavate becomes magma around the drill bit and damages it. You could perhaps remove more of that pesky rock standing in your way by carefully dropping small amounts of anti-matter, or by vaporizing the rock with powerful lasers. In either way there is going to be a lot of harmful things coming back at you from the tunnel, so be cautious and wear protective goggles. The goggles will not protect you from certain death, but at least you will look cool.