Quantum Computing, Open Source, Simulation, Python, Qiskit.
site and is performed by introducing the phase in front of each basis state using the sequence of CNOT and controlled phase operators sandwiched between two Hadamards. Since this diagonal operator is not unitary in general, this sequence can be seen as the implementation of the non-unitary diagonal