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

Filter out duplicate subexperiments before execution #262

Open
garrison opened this issue Jun 16, 2023 · 1 comment
Open

Filter out duplicate subexperiments before execution #262

garrison opened this issue Jun 16, 2023 · 1 comment
Labels
cutting QPD-based circuit cutting code quantum performance Related to the efficiency with which we are able to gain information from the quantum hardware

Comments

@garrison
Copy link
Member

The QPD bases we have considered so far each have 6 unique elements in their maps. However, if one looks at only a single qubit (either one), there are actually only 5 unique operations, as two of them are the same QPDMeasure operation:

https://github.com/Qiskit-Extensions/circuit-knitting-toolbox/blob/58376677cffdf9e0579b7f2ae3c2b8bd92e13ad0/circuit_knitting/cutting/qpd/qpd.py#L243-L250

For a separable circuit, when it comes time to run the sub-experiments, it's only necessary to run 5 distinct sub-experiments on each partition. However, right now, 6 subexperiments are run instead. We already have a test to make sure we can recognize these duplicate subexperiments. We should resolve this issue once we no longer send duplicate experiments to the backends.

More advanced thoughts regarding wire cutting

A lot of cases of duplicate circuits are straightforward, and we should start with them.

A tricky case, however, is in wire cutting. The I measurement and the Z measurement can be made through exactly the same circuit; the only difference is whether the corresponding bit of the qpd register is considered or ignored.

https://github.com/Qiskit-Extensions/circuit-knitting-toolbox/blob/669d9fdfa075ab31cc110be7a75940857c0a249c/circuit_knitting_toolbox/circuit_cutting/qpd/qpd.py#L337
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox/blob/669d9fdfa075ab31cc110be7a75940857c0a249c/circuit_knitting_toolbox/circuit_cutting/qpd/qpd.py#L340

Currently, we always take the parity of all available qpd measurement bits, but if we were to have a bit more control in post-processing, we could do this without running each circuit separately.

@garrison garrison added quantum performance Related to the efficiency with which we are able to gain information from the quantum hardware cutting QPD-based circuit cutting code labels Jun 16, 2023
@garrison garrison added this to the 0.4.0 milestone Jun 16, 2023
@garrison
Copy link
Member Author

To do this, we'll need to store the weights in a bit more complicated way (#385 (comment)) and be also to map between subexperiment index and (sample, observable) index #387.

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 quantum performance Related to the efficiency with which we are able to gain information from the quantum hardware
Projects
None yet
Development

No branches or pull requests

1 participant