- Define Quantum Circuit
qc = QuantumCircuit(number_of_qubits)
- Apply Quantum Gates to the Circuit
- Pauli-X Gate :
qc.x(Index_of_Qubit)
- Hadamard Gate :
qc.h(Index_of_Qubit)
- Pauli-Z :
qc.z(Index_of_Qubit)
- Rotation Gate :
qc.r(Angle_in_radians,Index_of_Qubit)
- Controll-X Gate :
qc.cx(Controll_Index,Target_Index)
- Controll-Z Gate :
qc.cz(Controll_Index,Target_Index)
- Controll-R Gate :
qc.cr(Controll_Index,Target_Index)
- Controll-Controll-X Gate :
qc.ccx(Controll_Index1,Controll_Index2,Target_Index)
- Pauli-X Gate :
- Simulate the Quanutm Circuit
- To measure Qubits :
qc.execute()
- Prints a single unitary matrix :
qc.unitary()
- Prints the current quantum state of the circuit :
qc.state
- Prints the probability of the states :
qc.prob()