Skip to content

Commit

Permalink
53 display most recent benchmarks (#151)
Browse files Browse the repository at this point in the history
* Include plots in readme with description

* Small formatting improvements for plots

* Updated plots

* Update benchmark results

---------

Co-authored-by: GitHub Actions <actions@github.com>
  • Loading branch information
jordandsullivan and actions-user authored Jan 2, 2025
1 parent 9a6b01a commit 95841b2
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ def test_cirq_compile():
CNOT(qubits[0], qubits[1]))
compile(circuit)
```
## How does UCC stack up?
We run benchmarks regularly to compare against the most recent versions of the most popular quantum compiler frameworks for a range of circuits. Here's the latest:
![alt text](benchmarks/latest_compiler_benchmarks_by_circuit.png)
And here you can see progress over time (changes usually indicate a newer version came out):
![alt text](benchmarks/avg_compiler_benchmarks_over_time.png)
Note that the compile times before 2024-12-10 may have been run on different classical compute instances, so their exact runtime is not as important to compare as their relative performance with respect to other compilers. After 2024-12-10, all data present in this plot should be run on the same compute instance using our [ucc-benchmarks](https://github.com/unitaryfund/ucc/blob/main/.github/workflows/ucc-benchmarks.yml) GitHub Actions workflow.

## License
UCC is distributed under [GNU Affero General Public License version 3.0](https://www.gnu.org/licenses/agpl-3.0.en.html)(AGPLv3).
Expand Down
Binary file modified benchmarks/avg_compiler_benchmarks_over_time.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified benchmarks/latest_compiler_benchmarks_by_circuit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions benchmarks/results/gates_2024-12-17_01.csv
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,27 @@ qiskit,qv,15000,5.245306968688965,14856
ucc,qv,15000,4.708544015884399,14856
pytket,qv,15000,4.425266981124878,15000
cirq,qv,15000,189.65349411964417,14856
qiskit,qaoa_barabasi_albert,1176,0.1727752685546875,1176
pytket,qaoa_barabasi_albert,1176,0.023452281951904297,1176
ucc,qaoa_barabasi_albert,1176,0.6359937191009521,1176
cirq,qaoa_barabasi_albert,1176,7.398545980453491,1176
qiskit,qft,10050,0.5890116691589355,3244
ucc,qft,10050,2.9714102745056152,2740
pytket,qft,10050,0.27279067039489746,5890
ucc,square_heisenberg,2160,0.33916473388671875,540
qiskit,square_heisenberg,2160,0.29282236099243164,540
pytket,square_heisenberg,2160,0.12082052230834961,2160
cirq,square_heisenberg,2160,9.305526494979858,540
qiskit,prep_select,9744,1.4739181995391846,9708
ucc,prep_select,9744,6.909214496612549,9702
ucc,qcnn,388,0.13475942611694336,388
qiskit,qcnn,388,0.09940123558044434,388
pytket,qcnn,388,0.024842500686645508,388
cirq,qft,10050,50.47000741958618,4648
pytket,prep_select,9744,0.2863733768463135,9712
cirq,qcnn,388,3.536428689956665,388
cirq,prep_select,9744,73.54473209381104,9712
ucc,qv,15000,4.6653971672058105,14856
pytket,qv,15000,4.610781669616699,15000
qiskit,qv,15000,5.471630811691284,14856
cirq,qv,15000,188.79904079437256,14856
2 changes: 2 additions & 0 deletions benchmarks/scripts/plot_avg_benchmarks_over_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
ax[1].set_xlabel("Date")
ax[1].set_yscale("log")

plt.xticks(rotation=45)

# Adjust layout and save the figure
plt.tight_layout()
filename = os.path.join(directory_of_this_file, "../avg_compiler_benchmarks_over_time.png")
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/scripts/plot_latest_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

ax[1].set_title(f"Gate Counts on Circuits (Date: {latest_date})")
ax[1].set_xlabel("Circuit Name")
ax[1].set_ylabel("Compiled Count")
ax[1].set_ylabel("Compiled Gate Count")
ax[1].set_xticks(x_positions)
ax[1].set_xticklabels(circuit_names, rotation=75)
ax[1].set_yscale("log")
Expand Down

1 comment on commit 95841b2

@jordandsullivan
Copy link
Collaborator Author

@jordandsullivan jordandsullivan commented on 95841b2 Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit updated the plot formatting but failed to pull the latest data from 01-02-2025, likely due to change 193af8c on the Workflow file.

Please sign in to comment.