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

Re-structuring of `mixture` protocol along with serial concatenation #4876

Open Zshan0 opened 2 years ago

Zshan0 commented 2 years ago

Summarize the task Re-structuring the mixture and has_mixture protocol by calling lower-level protocols such as unitary rather than accessing the corresponding attributes. If there exists no direct way of constructing the mixture, then the protocol must try decomposing the operation and apply serial concatenation.

Acceptance criteria - when is the task considered done? The above criteria for the protocols are satisfied and are supported with tests and consistency checks.

Related This issue must be resolved before #4822 can be completed.

Related issues: #4288

Zshan0 commented 2 years ago

I’m already working on this, some overview: