Quantum Computing, Quantum Physics, Programming, Physics, Science.
array Array indicating qubits indeces (in order) to append the gates to """ for i in range(len(qubits) - 1): qc.cx(qubits[i], qubits[i + 1]) qc.rz(-2 * t, qubits[-1]) for i in range(len(qubits) - 1, 0, -1): qc.cx(qubits[i - 1], qubits[i]) qc = QuantumCircuit(3) sim_z(np.pi, qc, [0, 1, 2]) qc.draw()