def grover_iteration(qstate, oracle):
 wgate = WGate(oracle.nqubits)
 return ((wgate * oracle) * qstate)

def grover_iteration ( qstate , oracle ) : wgate = WGate ( oracle . nqubits ) return ( ( wgate * oracle ) * qstate )
applies one application of the oracle and w gate .