text: # importing Qiskit
  from qiskit import IBMQ, Aer
  from qiskit import QuantumCircuit, transpile, assemble
  
  # import basic plot tools
  from qiskit.visualization import plot_histogram
  from qiskit_textbook.tools import simon_oracle
  
  b = '110'
  
  n = len(b)
  simon_circuit = QuantumCircuit(n * 2, n)
  
  # Apply Hadamard gates before querying the oracle
  simon_circuit.h(range(n))
  
  # Apply barrier for visual separation
  simon_circuit.barrier()
  
  simon_circuit += simon_oracle(b)
  
  # Apply barrier for visual separation
  simon_circuit.barrier()
  
  # Apply Hadamard gates to the input register
  simon_circuit.h(range(n))
  
  # Measure qubits
  simon_circuit.measure(range(n), range(n))
  simon_circuit.draw(output='mpl', filename='schema.png')
  
  # use local simulator
  qasm_sim = Aer.get_backend('qasm_simulator')
  shots = 1024
  qobj = assemble(simon_circuit, shots=shots)
  results = qasm_sim.run(qobj).result()
  counts = results.get_counts()
  plot_histogram(counts).savefig('diagram.png')
  