If you are using a Linux distribution which uses systemd, then you can use one if its utilities named systemd-run for resource control. For your case, it would be this:
sudo systemd-run --scope -p AllowedCPUs=VALUE CMD
sudo systemd-run --scope -p CPUQuota=VALUE% CMD
AllowedCPUs, you can mention the indice of the logical core to which you want to restrict the execution of your command. Indice is 0 for first logical core, 1 for second logical core, and so on.
CPUQuota, 100% equals one logical core's maximum available CPU time. 200% would be two logical cores, and so on.
# My stress commands wants to use all 8 logical cores of my machine,
# but systemd would limit it to allowed logical cores 0 and 4.
# I chose 0 and 4 because both belongs to the same physical core.
sudo systemd-run --scope -p AllowedCPUs=0,4 stress -c 8
# Here, my stress command despite being hungry for all CPUs would only
get 100% *available* time of one logical core only.
sudo systemd-run --scope CPUQuota=100% stress -c 8
Suggested readings: manual of systemd-run and systemd.resource-control.