コード例 #1
0
ファイル: random_gate_channel.py プロジェクト: cduck/Cirq
 def _has_kraus_(self):
     return not self._is_parameterized_() and protocols.has_kraus(self.sub_gate)
コード例 #2
0
 def _has_kraus_(self) -> bool:
     return protocols.has_kraus(self.sub_operation)
コード例 #3
0
 def _has_kraus_(self) -> bool:
     """Returns True if self has a Kraus representation and self uses <= 10 qubits."""
     return all(protocols.has_kraus(op)
                for op in self.operations) and len(self.qubits) <= 10