Make QPDBasis.from_instruction
work with gates whose parameters have not been specified
#256
Labels
cutting
QPD-based circuit cutting code
enhancement
New feature or request
qpd
Related to quasi-probability decompositions
It'd be nice to make
QPDBasis.from_gate
work with gates whose parameter(s) have not been specified. In this case, sampling from the QPD should mean, each time, sampling the parameter from its allowed value and then sampling from the weights implied by that chosen value. For sake of example, let's focus on anRZZGate
, where the value would be chosen uniformly from 0 to 2pi for each sample. The end goal here is to be able to perform sampling once to then gain the result for all values of theta in post-processing. But there are a lot of details we have to work out so this will work as expected.The user should also be able to specify a function that jointly samples from one or more parameters, in case they are interested in a regime where the parameters are correlated (e.g. the same value theta is set two different places in the circuit).
I believe that implementing this will be a lot easier if we think of it as a mesh over possible parameter points, rather than the parameters being continuous. This way, we can think of the weights needed to sample as being a sum/mean over all desired points on the parameter mesh, rather than having to do some kind of numerical integration. In post-processing, we can always adjust the parameters more finely than the mesh used for sampling in order to generate more data points, if desired.
Once we understand/implement general two-qubit unitaries (#186), we will have to figure out how it meshes with the goal of this issue.
The text was updated successfully, but these errors were encountered: