4
$\begingroup$

Is it possible to tell Qiskit to execute a parameterized gate where the parameter varies between shots?

Let's say, for whatever reason, I'd like to speed up the dephasing of a qubit during a run. I can accomplish this by explicating implementing the dephasing Kraus operators by using an $R_x(\phi)$ gate, a controlled $Z$ gate and an ancilla qubit. However, this adds a decent amount of complexity, and thus error, to my circuit.

A more clever way to do it is to add an $R_z(\theta)$ gate into the circuit, where $\theta$ is drawn from a normal distribution and thus varies shot to shot. This would mean the circuit would need to be reassembled from the parameterized transpilation each shot, which makes me think it's probably not possible. But I wanted to ask just in case.

I can always do a series of single shot experiments, but I believe the backend (not to mention other users) might have an issue with me submitting thousands of single shot jobs.

So is there any way to implement a circuit which has a parameter which varies from shot to shot?

$\endgroup$
  • 1
    $\begingroup$ Depending on the amount of circuits needed, I would suggest maybe creating all of the circuits needed with the different parameters, appending them all into a list, and sending them all within 1 job with 1 shot set. This would run through each circuit with 1 shot. However, you usually do not want to put thousands of circuits into 1 job, so I am not sure if this method would be what you are looking for $\endgroup$ – Matthew Stypulkoski Nov 25 at 15:30
  • $\begingroup$ Yeah, this is probably the only way and would be preferable to individual jobs for each shot. It's probably what qiskit would do under the hood anyway if something like this were supported. It would just be a bit of a pain to manage. Thanks for the response! $\endgroup$ – bRost03 Nov 25 at 17:37

Your Answer

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

Browse other questions tagged or ask your own question.