Skip to content

Latest commit

 

History

History
17 lines (17 loc) · 1.07 KB

README.md

File metadata and controls

17 lines (17 loc) · 1.07 KB

How to use

  1. Define Quantum Circuit qc = QuantumCircuit(number_of_qubits)

  2. 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)

  3. 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()