



"""simple docstring"""
import qiskit





def  lowerCamelCase_						(UpperCamelCase__		:		int     ,       UpperCamelCase__		:		int							):
    _UpperCAmelCase							:  Tuple											=    qiskit.Aer.get_backend('''aer_simulator'''							)

    # Create a Quantum Circuit acting on the q register
    _UpperCAmelCase							:  int											=    qiskit.QuantumCircuit(UpperCamelCase__     ,       UpperCamelCase__							)

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

    # Execute the circuit on the simulator
    _UpperCAmelCase							:  Dict											=    qiskit.execute(UpperCamelCase__     ,       UpperCamelCase__     ,       shots=1000							)

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


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







"""simple docstring"""
from __future__ import annotations

import math





def  lowerCamelCase_						(UpperCamelCase__		:		int     ,       UpperCamelCase__		:		int     ,       UpperCamelCase__		:		bool     ,       UpperCamelCase__		:		list[int]     ,       UpperCamelCase__		:		float							):

    if depth < 0:
        raise ValueError('''Depth cannot be less than 0'''							)

    if len(UpperCamelCase__							) == 0:
        raise ValueError('''Scores cannot be empty'''							)

    if depth == height:
        return scores[node_index]

    if is_max:
        return max(
            minimax(depth + 1     ,       node_index * 2     ,       UpperCamelCase__     ,       UpperCamelCase__     ,       UpperCamelCase__							)     ,       minimax(depth + 1     ,       node_index * 2 + 1     ,       UpperCamelCase__     ,       UpperCamelCase__     ,       UpperCamelCase__							)     ,       )

    return min(
        minimax(depth + 1     ,       node_index * 2     ,       UpperCamelCase__     ,       UpperCamelCase__     ,       UpperCamelCase__							)     ,       minimax(depth + 1     ,       node_index * 2 + 1     ,       UpperCamelCase__     ,       UpperCamelCase__     ,       UpperCamelCase__							)     ,       )





def  lowerCamelCase_						():
    _UpperCAmelCase							:  Any											=    [90, 23, 6, 33, 21, 65, 123, 3_4423]
    _UpperCAmelCase							:  Any											=    math.log(len(UpperCamelCase__							)     ,       2							)
    print('''Optimal value : '''     ,       end=''''''							)
    print(minimax(0     ,       0     ,       UpperCamelCase__     ,       UpperCamelCase__     ,       UpperCamelCase__							)							)


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  main()


