

'''simple docstring'''







import qiskit
def  UpperCAmelCase__      ( UpperCAmelCase__,    UpperCAmelCase__			)     ->     qiskit.result.counts.Counts:
       A_		   = qiskit.Aer.get_backend("""aer_simulator"""			)

       # Create a Quantum Circuit acting on the q register
       A_		   = qiskit.QuantumCircuit(UpperCAmelCase__,    UpperCAmelCase__			)

       # Apply X (NOT) Gate to Qubits 0 & 1
       circuit.x(0			)
       circuit.x(1			)

       # Map the quantum measurement to the classical bits
       circuit.measure([0, 1],    [0, 1]			)

       # Execute the circuit on the qasm simulator
       A_		   = qiskit.execute(UpperCAmelCase__,    UpperCAmelCase__,    shots=10_00			)

       # Return the histogram data of the results of the experiment.
       return job.result().get_counts(UpperCAmelCase__			)


if __name__ == "__main__":
      __lowerCamelCase						    =      single_qubit_measure(2, 2)
      print(f'''Total count for various states are: {counts}''')



'''simple docstring'''







from __future__ import annotations

from typing import Any
def  UpperCAmelCase__      ( UpperCAmelCase__			)     ->     int:
       if not postfix_notation:
              return 0

       A_		   = {"""+""", """-""", """*""", """/"""}
       A_		   = []

       for token in postfix_notation:
              if token in operations:
                     A_   ,     A_		   = stack.pop(), stack.pop()
                     if token == "+":
                            stack.append(a + b			)
                     elif token == "-":
                            stack.append(a - b			)
                     elif token == "*":
                            stack.append(a * b			)
                     else:
                            if a * b < 0 and a % b != 0:
                                   stack.append(a // b + 1			)
                            else:
                                   stack.append(a // b			)
              else:
                     stack.append(int(UpperCAmelCase__			)			)

       return stack.pop()


if __name__ == "__main__":
      import doctest

      doctest.testmod()
