import numpy as np
# Importing standard Qiskit libraries
from qiskit import QuantumCircuit, transpile, Aer, IBMQ
from qiskit.tools.jupyter import *
from qiskit.visualization import *
from ibm_quantum_widgets import *
from qiskit import *
# Loading your IBM Q account(s)
#provider = IBMQ.load_account()

q = QuantumRegister(1)
c = ClassicalRegister(1)
qc = QuantumCircuit(q, c)

qc.h(q[0])
qc.x(q[0])
qc.measure(q, c)

#To convert into qasm use:-
qc.qasm(formatted=True, filename='my_circuit.qasm')

#To get circuit from qasm file use:- 
qc = QuantumCircuit.from_qasm_file('my_circuit.qam')