Quinidine messes with sodium channel currents in your heart, and acts to prevent arrythmia in some cases (this is the medical usage of the drug - but in healthy people it can cause heart problems if taken in high doses).
Quinidine also acts as an inhibitor of some CYP450 enymes which break down, or metabolize, many drugs including some opiates. So taking qunindine can make some drugs last longer for one dose. On the converse, it may stop some drugs like codeine from working properly, because they need to be metabolized to become active!
Relating to loperamide, quinidine is an inhibitor of a protien called P-glycoprotien. It acts to transport certain drugs "out of" the blood-brain barrier that are too polar and mistakenly slip into the barrier cells. Normally this means that it pumps all the loperamide out, but inhibiting the protien means some may cross the blood-brain barrier and become active after all.
Please don't consider taking quinidine to make loperamide active. There is research showing that large doses of loperamide may be neurotoxic (it wasn't designed as a centrally active drug), and there is also good evidence that it can cause massive constipation and other bad things. Add to that the risks involved with taking large doses of a medication that plays with heart currents, and you are walking a very fine tightrope for an opiate high. Stick to Kratom or poppy pod tea.