Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make QPDBasis.from_instruction work with gates whose parameters have not been specified #256

Open
garrison opened this issue Jun 16, 2023 · 0 comments
Labels
cutting QPD-based circuit cutting code enhancement New feature or request qpd Related to quasi-probability decompositions

Comments

@garrison
Copy link
Member

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 an RZZGate, 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.

@garrison garrison added enhancement New feature or request cutting QPD-based circuit cutting code qpd Related to quasi-probability decompositions labels Jun 16, 2023
@garrison garrison changed the title Make QPDBasis.from_gate work with gates whose parameters have not been specified Make QPDBasis.from_instruction work with gates whose parameters have not been specified Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cutting QPD-based circuit cutting code enhancement New feature or request qpd Related to quasi-probability decompositions
Projects
None yet
Development

No branches or pull requests

1 participant