quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.28k stars 1.02k forks source link

Efficiently Implement clifford groups for single and two qubit clifford groups #6389

Closed NoureldinYosri closed 9 months ago

NoureldinYosri commented 11 months ago

Is your feature request related to a use case or problem? Please describe. https://github.com/quantumlib/Cirq/blob/main/cirq-core/cirq/experiments/qubit_characterizations.py practically implements single and two qubit clifford groups in order to do sampling. However the implementation is inefficient taking ~3s to sample 1000 cliffords. that's because the clifford groups are implemented directly as matricies and operations are done as matrix multiplication, inversion or mapping to/from index.

Describe the solution you'd like update SingleQubitCliffordGate https://github.com/quantumlib/Cirq/blob/7c9b713715b834f740592e50cc16dc3af5fcef1c/cirq-core/cirq/ops/clifford_gate.py#L461 to implment the single qubit clifford group.

What is the urgency from your perspective for this issue? Is it blocking important work? P1 - I need this no later than the next release (end of quarter)

NoureldinYosri commented 9 months ago

the single qubit case was done in the linked PRs. the two qubit case is not needed for now but we can revisit this decision when there is a use case