
"""simple docstring"""




from PIL import Image




def  _lowerCAmelCase		(		_UpperCamelCase ,				_UpperCamelCase						):






  """simple docstring"""



  def brightness(_UpperCamelCase						) -> float:
    return 128 + level + (c - 128)

  if not -255.0 <= level <= 255.0:
    raise ValueError('''level must be between -255.0 (black) and 255.0 (white)'''						)
  return img.point(_UpperCamelCase						)


if __name__ == "__main__":
  # Load image
  with Image.open('image_data/lena.jpg') as img:
    # Change brightness to 100
    A__   :					Union[str, Any]							=   change_brightness(img, 1_0_0)
    brigt_img.save('image_data/lena_brightness.png', format='png')


"""simple docstring"""




import qiskit




def  _lowerCAmelCase		(		_UpperCamelCase ,				_UpperCamelCase						):






  """simple docstring"""



  _lowercase:			Dict       =     qiskit.Aer.get_backend('''aer_simulator'''						)

  # Create a Quantum Circuit acting on the q register
  _lowercase:			str       =     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
  _lowercase:			Tuple       =     qiskit.execute(_UpperCamelCase ,				_UpperCamelCase ,				shots=1_000						)

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


if __name__ == "__main__":
  A__   :					Optional[int]							=   single_qubit_measure(2, 2)
  print(f"""Total count for various states are: {counts}""")
