S q[0] # execute phase gate on qubit 0 Sdag q[1:2,5] # execute conjugate transpose of the S gate on qubits 1,2 and 5