-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Folding functions should retain circuit properties (e.g., num shots) and device information (e.g., qubits, connectivity, etc.) #9
Comments
I think it's a good point. Moreover the same problem probably exists also for PyQuil circuits (e.g. I agree with your solution, otherwise a simple alternative is also this one: |
Good point about pyQuil circuits and properties. I tested empty_circuit = input_circuit[0:0] and it didn't copy over the shots. I'll update the name of this issue to reflect the importance for pyQuil as well. |
It is true that An empty circuit in PyQuil can be correctly created in this way however, even in this case, |
I will make a PR (#11 ) to improve the creation of empty circuits in PyQuil using The problem with |
@andreamari does the issue appear specific to num_shots instructions? If so, perhaps dedicated code should exist to pop off this instruction? Alternatively, we could code for with the assumption that the user does not choose numshots for things to be mitigated. When you run a given Program through mitigation it isn't clear what the numshots should do as the Mitigator will have discretion to choose optimal amounts of shots to take etc |
Of the two approaches I just suggested. I think I prefer stripping num_shots from an input program and emitting a warning to the user that it is being ignored. |
It is not just I think I got what is the solution: one should only append instructions (or circuit slices) with the |
ah gotcha. This is an unexpected idiosyncrasy indeed. Does that mean that replacing all |
This issue is now solved by #11 . |
# This is the 1st commit message: simplify cirq getting started and add qiskit getting started # This is the commit message #2: add tests of qiskit getting started # This is the commit message #3: update qiskit example with conversions # This is the commit message #4: move seeds # This is the commit message #5: add doctests to main getting started # This is the commit message #6: better seed # This is the commit message #7: set seeds # This is the commit message #8: update # This is the commit message #9: qiskit name # This is the commit message #10: line # This is the commit message #11: update doc tests and remove redundant tests # This is the commit message #12: fix apidoc
* # This is a combination of 12 commits. # This is the 1st commit message: simplify cirq getting started and add qiskit getting started # This is the commit message #2: add tests of qiskit getting started # This is the commit message #3: update qiskit example with conversions # This is the commit message #4: move seeds # This is the commit message #5: add doctests to main getting started # This is the commit message #6: better seed # This is the commit message #7: set seeds # This is the commit message #8: update # This is the commit message #9: qiskit name # This is the commit message #10: line # This is the commit message #11: update doc tests and remove redundant tests # This is the commit message #12: fix apidoc * update getting started * reformat testcode as block * switch to make doctest * include change to make doctest in workflow file * add doctest to workflow * test documentation in ci with doctest * remove lines to prompt build * revert to original ci file * add new name run with pytest-sphinx * add sphinx to install * add cd * add sphinx dependencies and extentions to ci * purposefully introduce error to check ci build fails * revert to passing build * add documentation testing to readme * remove README extra file * update zne.py for new keep type default * move random seed to test * make test factories seed local * make noise mitigation more clear Co-authored-by: Nathan Shammah <nathan.shammah@gmail.com>
Our current folding techniques for Cirq build the folded circuit from an empty circuit. Circuits in Cirq can be tied to a device which tells information about qubits, connectivity, and gate operation times. As such, I think it's more appropriate to copy the input circuit and insert gates to do the folding. Thoughts?
The text was updated successfully, but these errors were encountered: