-
Notifications
You must be signed in to change notification settings - Fork 737
Added benchmarks for isometries #315
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for writing this, it LGTM for the most part. Besides the lint failure, we should also detect whether the iso
method is present or not on the quantum circuit object. That way this benchmark will only be attempted to run on commits after the dependent PR in terra lands (the benchmarks are run on current master as well as at any point in the git log for comparison purposes). I think this wi'll be ready to go after that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these benchmarks are good, and I was ready to approve it. But, we need to change the return format for track_gate_counts()
. This won't work while returning a dictionary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick update. There's just one small quick inline code simplification I think we should make here. After that small change is made this LGTM and I'll merge.
In an effort to reduce the noise in the measurements made by the benchmark this commit sets a seed for all calls that take one; transpile() and random_unitary(). It also moves the skip check to the top of setup so we don't waste time trying to do anything if we're just going to skip.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took care of the simplification I mentioned before, and also set a seed for all functions that took one to reduce noise in the benchmarks. Also moved the skip raise as early as I could in the setup()
(which are all things I noticed on a second look). With this it's ready to merge now.
* Added benchmarks for isometries * Some small fixes * Track numerical value * Simplify counts get logic * Set a seed and skip faster In an effort to reduce the noise in the measurements made by the benchmark this commit sets a seed for all calls that take one; transpile() and random_unitary(). It also moves the skip check to the top of setup so we don't waste time trying to do anything if we're just going to skip.
* Added benchmarks for isometries * Some small fixes * Track numerical value * Simplify counts get logic * Set a seed and skip faster In an effort to reduce the noise in the measurements made by the benchmark this commit sets a seed for all calls that take one; transpile() and random_unitary(). It also moves the skip check to the top of setup so we don't waste time trying to do anything if we're just going to skip.
Added benchmarks for the run-time and the gate counts for the decomposition of isometries from
m to n qubits for different values of m and n.