Feature/symmetric stabilizer benchmarking#1164
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
dowusu-antwi
left a comment
There was a problem hiding this comment.
LGTM % a couple of nits
| assert len(experiment._stabilizer_states) == 12 | ||
| assert len(experiment._init_rotations) == 12 | ||
| for rot in experiment._init_rotations: | ||
| assert len(rot) == 5 | ||
| assert len(experiment._reconciliation_rotation) == 12 | ||
| for rot in experiment._reconciliation_rotation: | ||
| assert len(rot) == 4 |
There was a problem hiding this comment.
Can we add a comment describing how these follow from the experiment parameters?
|
most of the changes are probably superfluous/now outdated, but i think the important ones are:
|
Co-authored-by: dowusu-antwi <david@super.tech>
| assert num == depth - 2, (max_depth, depth, num) | ||
|
|
There was a problem hiding this comment.
this can be removed - it's not really checking anything
| assert num == depth - 2, (max_depth, depth, num) |
| def _json_dict_(self) -> dict[str, Any]: | ||
| """Converts the experiment to a json-able dictionary that can be used to recreate the | ||
| experiment object. Note that the state of the random number generator is not stored. | ||
|
|
||
| Returns: | ||
| Json-able dictionary of the experiment data. | ||
| """ | ||
| return super()._json_dict_() | ||
|
|
There was a problem hiding this comment.
should this be adding something? otherwise it doesn't seem necessary to override
| def _json_dict_(self) -> dict[str, Any]: | |
| """Converts the experiment to a json-able dictionary that can be used to recreate the | |
| experiment object. Note that the state of the random number generator is not stored. | |
| Returns: | |
| Json-able dictionary of the experiment data. | |
| """ | |
| return super()._json_dict_() |
There was a problem hiding this comment.
_json_dict is declared as an abstract method for the parent class to force a custom implementation when necessary.
| num = 0 | ||
| for i in range(max_depth - 2): | ||
| if i in indices: | ||
| circuit += cirq.CZ.on(*self.qubits).with_tags("no_compile") |
There was a problem hiding this comment.
do we need to add barriers around this like we did in #1199?
There was a problem hiding this comment.
Added barriers just to ensure the compiler is not simplifying the different blocks.
dowusu-antwi
left a comment
There was a problem hiding this comment.
Nits + error fixes:
|
LGTM (although GH won't let me review as I originally opened the PR nearly a year ago...) |
Add symmetric stabilizer benchmarking to the QCVV library.
@richrines1 - this is based off my initial branch (as I wasn't sure where yours ended up) so feel free to suggest changes based on your experience!
Closes #1069