Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
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
    )