Skip to content

optimize clifford benchmark circuit creation for a total 94.5% speedup#6401

Merged
NoureldinYosri merged 14 commits intomainfrom
cliffords
Jan 8, 2024
Merged

optimize clifford benchmark circuit creation for a total 94.5% speedup#6401
NoureldinYosri merged 14 commits intomainfrom
cliffords

Conversation

@NoureldinYosri
Copy link
Copy Markdown
Collaborator

@NoureldinYosri NoureldinYosri commented Jan 8, 2024

This is a followup to #6392 and reduces circuit creation time (for 1000 cliffords and 50 qubits) to 0.213s from the original 3.886s (94.5% speedup) and the 2.148s (90% speedup) following #6392

In [3]: import cirq.experiments.qubit_characterizations as ceq
   ...: import cirq
   ...: import time
   ...: import numpy as np
   ...: 
   ...: num_cliffords = 1000
   ...: qubits = cirq.LineQubit.range(50)
   ...: 
   ...: cliffords = ceq._single_qubit_cliffords()
   ...: c1 = cliffords.c1_in_xy
   ...: t1 = time.time()
   ...: seq = ceq._create_parallel_rb_circuit(qubits, num_cliffords, c1)
   ...: t2 = time.time()
   ...: print(f'{t2-t1} s')
0.2055680751800537 s

Comment thread cirq-core/cirq/experiments/qubit_characterizations.py Outdated
Comment thread cirq-core/cirq/experiments/qubit_characterizations.py Outdated
@NoureldinYosri NoureldinYosri requested a review from maffoo January 8, 2024 21:03
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d33b1a7) 97.81% compared to head (0458700) 97.81%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6401   +/-   ##
=======================================
  Coverage   97.81%   97.81%           
=======================================
  Files        1111     1111           
  Lines       97054    97088   +34     
=======================================
+ Hits        94931    94965   +34     
  Misses       2123     2123           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread cirq-core/cirq/experiments/qubit_characterizations.py Outdated
@NoureldinYosri NoureldinYosri enabled auto-merge (squash) January 8, 2024 22:26
@NoureldinYosri NoureldinYosri merged commit 9e86d36 into main Jan 8, 2024
@dabacon
Copy link
Copy Markdown
Collaborator

dabacon commented Jan 18, 2024

Nice work!

harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
quantumlib#6401)

This is a followup to quantumlib#6392 and reduces circuit creation time (for 1000 cliffords and 50 qubits) to 0.213s from the original 3.886s (94.5% speedup) and the 2.148s (90% speedup) following quantumlib#6392

```
In [3]: import cirq.experiments.qubit_characterizations as ceq
   ...: import cirq
   ...: import time
   ...: import numpy as np
   ...: 
   ...: num_cliffords = 1000
   ...: qubits = cirq.LineQubit.range(50)
   ...: 
   ...: cliffords = ceq._single_qubit_cliffords()
   ...: c1 = cliffords.c1_in_xy
   ...: t1 = time.time()
   ...: seq = ceq._create_parallel_rb_circuit(qubits, num_cliffords, c1)
   ...: t2 = time.time()
   ...: print(f'{t2-t1} s')
0.2055680751800537 s
```
@pavoljuhas pavoljuhas deleted the cliffords branch January 22, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants