本文整理匯總了Python中PauliClass.restricted_pauli_group方法的典型用法代碼示例。如果您正苦於以下問題:Python PauliClass.restricted_pauli_group方法的具體用法?Python PauliClass.restricted_pauli_group怎麽用?Python PauliClass.restricted_pauli_group使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PauliClass
的用法示例。
在下文中一共展示了PauliClass.restricted_pauli_group方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: possible_faults
# 需要導入模塊: import PauliClass [as 別名]
# 或者: from PauliClass import restricted_pauli_group [as 別名]
def possible_faults(circuit):
"""
Takes a sub-circuit which has been padded with waits, and returns an
iterator onto Paulis which may occur as faults after this sub-circuit.
:param qecc.Circuit circuit: Subcircuit to in which faults are to be
considered.
"""
return it.chain.from_iterable(
pc.restricted_pauli_group(loc.qubits, circuit.nq)
for loc in circuit
)