

import numpy as np
import qiskit
from qiskit import Aer, ClassicalRegister, QuantumCircuit, QuantumRegister, execute







def  UpperCAmelCase_   (_lowerCAmelCase :		float = np.pi / 2     ,			_lowerCAmelCase :		float = np.pi / 2     ,			_lowerCAmelCase :		float = np.pi / 2		):
			__UpperCamelCase    :    Dict								=      QuantumRegister(3     ,			"qr"		)  # Define the number of quantum bits
			__UpperCamelCase    :    Any								=      ClassicalRegister(1     ,			"cr"		)  # Define the number of classical bits

			__UpperCamelCase    :    Dict								=      QuantumCircuit(_lowerCAmelCase     ,			_lowerCAmelCase		)  # Define the quantum circuit.

			# Build the circuit
			quantum_circuit.u(_lowerCAmelCase     ,			_lowerCAmelCase     ,			_lowerCAmelCase     ,			0		)  # Quantum State to teleport
			quantum_circuit.h(1		)  # add hadamard gate
			quantum_circuit.cx(
			    1     ,			2		)  # add control gate with qubit 1 as control and 2 as target.
			quantum_circuit.cx(0     ,			1		)
			quantum_circuit.h(0		)
			quantum_circuit.cz(0     ,			2		)  # add control z gate.
			quantum_circuit.cx(1     ,			2		)

			quantum_circuit.measure([2]     ,			[0]		)  # measure the qubit.

			# Simulate the circuit using qasm simulator
			__UpperCamelCase    :    Tuple								=      Aer.get_backend("aer_simulator"		)
			__UpperCamelCase    :    str								=      execute(_lowerCAmelCase     ,			_lowerCAmelCase     ,			shots=10_00		)

			return job.result().get_counts(_lowerCAmelCase		)


if __name__ == "__main__":
					print(
					    "Total count for teleported state is: "
					    F"""{quantum_teleportation(np.pi/2, np.pi/2, np.pi/2)}"""
					)


import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin


lowercase     :       Dict        =       "\nHugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf originally as a company that developed a chatbot app targeted at teenagers.[2] After open-sourcing the model behind the chatbot, the company pivoted to focus on being a platform for machine learning.\n\nIn March 2021, Hugging Face raised $40 million in a Series B funding round.[3]\n\nOn April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model.[4] In 2022, the workshop concluded with the announcement of BLOOM, a multilingual large language model with 176 billion parameters.[5]\n"
class 		SCREAMING_SNAKE_CASE__					(		unittest.TestCase						,	lowerCamelCase__   ):







						"""simple docstring"""




						def __lowerCamelCase					(				self    )							->	Union[str, Any]:




									'''simple docstring'''


									__UpperCamelCase    :    str								=      load_tool("summarization"    )
									self.tool.setup()
									__UpperCamelCase    :    str								=      load_tool("summarization" , remote=__UpperCamelCase    )

						def __lowerCamelCase					(				self    )							->	Optional[int]:




									'''simple docstring'''


									__UpperCamelCase    :    Union[str, Any]								=      self.tool(__UpperCamelCase    )
									self.assertEqual(
									    __UpperCamelCase , "Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM." , )

						def __lowerCamelCase					(				self    )							->	int:




									'''simple docstring'''


									__UpperCamelCase    :    Any								=      self.remote_tool(__UpperCamelCase    )
									self.assertEqual(
									    __UpperCamelCase , "Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM." , )

						def __lowerCamelCase					(				self    )							->	List[Any]:




									'''simple docstring'''


									__UpperCamelCase    :    List[Any]								=      self.tool(text=__UpperCamelCase    )
									self.assertEqual(
									    __UpperCamelCase , "Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM." , )




						def __lowerCamelCase					(				self    )							->	str:




									'''simple docstring'''


									__UpperCamelCase    :    str								=      self.remote_tool(text=__UpperCamelCase    )
									self.assertEqual(
									    __UpperCamelCase , "Hugging Face was founded in 2016 by French entrepreneurs Clément Delangue, Julien Chaumond, and Thomas Wolf. In March 2021, Hugging Face raised $40 million in a Series B funding round. On April 28, 2021, the company launched the BigScience Research Workshop in collaboration with several other research groups to release an open large language model. In 2022, the workshop concluded with the announcement of BLOOM." , )