How to use parallel executions of circuits?

I am trying to run multiple circuits in parallel using the documentation here. My codes are:

from qiskit import QuantumCircuit
from qiskit.circuit.quantumregister import QuantumRegister
from qiskit.circuit.classicalregister import ClassicalRegister
from qiskit import Aer, execute
from qiskit.providers.aer.backends import QasmSimulator

def apply_measurement(circ):
c = ClassicalRegister(len(circ.qubits), 'c')
meas = QuantumCircuit(circ.qregs[0], c)
meas.barrier(circ.qubits)
meas.measure(circ.qubits,c)
qc = circ+meas
return qc

qr = QuantumRegister(4)
circ = QuantumCircuit(qr)
for i in range(4):
for j in range(i+1,4):
circ.cx(i,j)

qc = apply_measurement(circ)
circuits = [qc for i in range(3)]
num_shots = int(1e6)

backend = Aer.get_backend('qasm_simulator')
noiseless_qasm_result = execute(circuits, backend, shots=num_shots, backend_options=backend_options).result()
print(noiseless_qasm_result)

backend = Aer.get_backend('qasm_simulator')
noiseless_qasm_result = execute(circuits, backend, shots=num_shots, backend_options=backend_options).result()
print(noiseless_qasm_result)


Where I am running three copies of the same circuit. I did not see any changes in the result object obtained, nor is there any runtime improvement. Both take about 10 seconds. What should be the proper way to run those three circuits in parallel?

Try changing your max_parallel_threads value to more than 1.
max_parallel_threads (int): Sets the maximum number of CPU cores used by OpenMP for parallelization. If set to 0 the maximum will be set to the number of CPU cores (Default: 0).
max_parallel_experiments (int): Sets the maximum number of qobj experiments that may be executed in parallel up to the max_parallel_threads value. If set to 1 parallel circuit execution will be disabled. If set to 0 the maximum will be automatically set to max_parallel_threads (Default: 1).
• That does change the parallel_state_update, but there still is no runtime improvement. It still takes about 10 seconds to run. – FSeed Dec 15 '19 at 4:19
• Could you also change the max_parallalel_shots and check – ss09 Dec 15 '19 at 4:21
• It seems like max_parallel_experiments is the only parameter that does something. I get the best runtime when set max_parallel_threads to be the default 0 and max_parallel_shots to be the default 1. Setting max_parallel_experiments to be 0 does nothing, you have to explicitly set it to number of CPUs. The documentation is wrong for the default cases. – FSeed Dec 15 '19 at 4:55