Skip to content

Commit

Permalink
Add QASM file loading implementation in load_qasm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Himasnhu-AT committed May 3, 2024
1 parent 8b73fc1 commit 811d5a6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions python-impl/load_qasm/load_qasm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from qiskit import QuantumCircuit
from qiskit.providers.basic_provider import BasicSimulator

circ = QuantumCircuit.from_qasm_file("examples/qasm/entangled_registers.qasm")
print(circ)

# See the backend
sim_backend = BasicSimulator()

# Compile and run the Quantum circuit on a local simulator backend
job_sim = sim_backend.run(circ)
sim_result = job_sim.result()

# Show the results
print("simulation: ", sim_result)
print(sim_result.get_counts(circ))

0 comments on commit 811d5a6

Please sign in to comment.