2
$\begingroup$

We are trying to implement an algorithm which uses Amplitude estimation as one of its subroutines. Now we are pretty sure that the algorithm is working, like we have done testing of the algorithm by simply measuring out the circuit and obtaining the respective amplitudes. But for the actual final results we want to run this with amplitude estimation.

Now adding the amplitude estimation actually increases the depth of the circuit exponentially, due to which it is taking forever to run the code(not exactly sure about the metric but it is unfeasible at the moment), earlier it was taking time to make control of the circuit too, but we have been able to circumvent that issue.

Now, here is my main question- we have access to a small sized hpc, but we are not sure how to parallelize the code and run it using that. As far as I am familiar hpc's run code in parallel, but one quantum circuit can not be parallelized across multiple nodes. So the best we can do is go one quantum circuit per node, which is I think done by this qiskit's method which we are currently trying to use. But we are facing some problems with that too!!

Is there any simpler and more direct method to use HPC's for qiskit. P.S I am new to using HPC's so bear with my basic question. Thanks !!!

$\endgroup$

1 Answer 1

2
$\begingroup$

Parallelization in Qiskit simulation has three levels:

  • experiment: multiple-circuits are simulated in parallel
  • shot: multiple-shots are simulated in parallel
  • state update: A state (such as statevector) is updated in parallel

In any levels, Qiskit-Aer provides node-level and thread-level parallelization. The blog introduced experiment + node parallelization. The best configuration for parallelization depends on what types of experiments (noise or noise-less, number of circuits, qubits, intermediate-measure exists or not) are simulated.

The most easy way to use a HPC system for simulation is just to submit a job that runs a Qiskit program (including simulation) into the HPC system, I believe. Though a single node in the HPC system is used for simulation, Aer can use all the threads of the node.

If you want to simulate multiple-circuits, or noise, or many qubits (such as 40), multi-nodes of a HPC system will work performance.

$\endgroup$
2
  • $\begingroup$ Hi, do you know how to parallelize the shots over different processors belonging to a particular node! Like I have been able to do run 5 circuits over 5 processors, but how would I go about doing this over shots?? $\endgroup$ Jan 31 at 9:47
  • $\begingroup$ Shots are parallelized on multiple-nodes with the new feature of 0.10.0. Please see github.com/Qiskit/qiskit-aer/pull/1339. Note that, if your circuits have no conditional gates and noise is not simulated, Qiskit-Aer uses sampling from a statevector and does not parallelize simulation based on shots. $\endgroup$ Feb 1 at 3:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.