Cirq icon indicating copy to clipboard operation
Cirq copied to clipboard

_mixture_ should be able to return List[Tuple[float, Operation]] instead of List[Tuple[float, matrix]]

Open Strilanc opened this issue 6 years ago • 4 comments

Where it is required that the operations be unitary.

This is beneficial because it allows you to return mixtures of large operations, without having to generate their unitaries.

Fixing this mostly involves finding usages of mixture and making them account for this.

Strilanc avatar May 17 '19 21:05 Strilanc

You mean Gate instead of Operation?

dabacon avatar May 23 '19 22:05 dabacon

Good point. A Gate's _mixture_ would return gates, whereas an Operation's _mixture_ would return operations. Then, in GateOperation, there would be a conversion.

Strilanc avatar May 23 '19 23:05 Strilanc

Is this a duplicate of #1626? Also, I can give this a shot.

c-poole avatar Jun 05 '19 17:06 c-poole

Yup, it's a duplicate. Both by me. Four days apart. Wow.

Strilanc avatar Jun 05 '19 17:06 Strilanc