Quantum Computing, Quantum Computer, Qiskit, Quantum Physics, Python.
sandwiching Z gate between two H gates: Starting in the Z-basis, the H-gate switches our qubit to the X-basis, the Z-gate performs a NOT in the X-basis, and the final H-gate returns our qubit to the Z-basis. We can verify this always behaves like an X-gate by multiplying the matrices: Following the