





"""simple docstring"""




from __future__ import annotations

import unittest

from transformers import is_tf_available
from transformers.testing_utils import require_sentencepiece, require_tf, require_tokenizers, slow


if is_tf_available():
		import numpy as np
		import tensorflow as tf

		from transformers import TFCamembertModel


@require_tf
@require_sentencepiece
@require_tokenizers
class  __UpperCamelCase       (		unittest.TestCase		):






							@slow
							def 					__a     (     self   )			->				Any:
								a   :	int			=       TFCamembertModel.from_pretrained("jplu/tf-camembert-base"   )

								a   :	Any			=       tf.convert_to_tensor(
								    [[5, 121, 11, 660, 16, 730, 2_5543, 110, 83, 6]]   ,      dtype=tf.intaa   ,      )  # J'aime le camembert !"

								a   :	List[Any]			=       model(lowerCAmelCase__   )["last_hidden_state"]
								a   :	Optional[Any]			=       tf.TensorShape((1, 10, 768)   )
								self.assertEqual(output.shape   ,      lowerCAmelCase__   )
								# compare the actual values for a slice.
								a   :	str			=       tf.convert_to_tensor(
								    [[[-0.0_254, 0.0_235, 0.1_027], [0.0_606, -0.1_811, -0.0_418], [-0.1_561, -0.1_127, 0.2_687]]]   ,      dtype=tf.floataa   ,      )
								# camembert = torch.hub.load('pytorch/fairseq', 'camembert.v0')
								# camembert.eval()
								# expected_slice = roberta.model.forward(input_ids)[0][:, :3, :3].detach()

								self.assertTrue(np.allclose(output[:, :3, :3].numpy()   ,      expected_slice.numpy()   ,      atol=1E-4   )   )









"""simple docstring"""




import qiskit






def    _SCREAMING_SNAKE_CASE	(			_lowercase		:					int					, _lowercase		:					int      )				->qiskit.result.counts.Counts:






	'''simple docstring'''






	a   :	Union[str, Any]			=       qiskit.Aer.get_backend("aer_simulator"      )

	# Create a Quantum Circuit acting on the q register
	a   :	Optional[Any]			=       qiskit.QuantumCircuit(_lowercase					, _lowercase      )

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

	# Execute the circuit on the simulator
	a   :	Optional[int]			=       qiskit.execute(_lowercase					, _lowercase					, shots=1000      )

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


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


