
"""simple docstring"""

import qiskit
def 		UpperCAmelCase (		a_,						a_      ):





		'''simple docstring'''


		lowerCamelCase					:      List[str]          =   qiskit.Aer.get_backend('aer_simulator'      )

		lowerCamelCase					:      Tuple          =   qiskit.QuantumCircuit(4,						2      )
		# encode inputs in qubits 0 and 1
		if bita == 1:
				qc_ha.x(0      )
		if bita == 1:
				qc_ha.x(1      )
		qc_ha.barrier()

		# use cnots to write XOR of the inputs on qubit2
		qc_ha.cx(0,						2      )
		qc_ha.cx(1,						2      )

		# use ccx / toffoli gate to write AND of the inputs on qubit3
		qc_ha.ccx(0,						1,						3      )
		qc_ha.barrier()

		# extract outputs
		qc_ha.measure(2,						0      )  # extract XOR value
		qc_ha.measure(3,						1      )  # extract AND value

		# Execute the circuit on the qasm simulator
		lowerCamelCase					:      int          =   qiskit.execute(a_,						a_,						shots=1000      )

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


if __name__ == "__main__":
					_A						=			half_adder(1, 1)
					print(F"""Half Adder Output Qubit Counts: {counts}""")








"""simple docstring"""

from ....configuration_utils import PretrainedConfig
from ....utils import logging


_A						=			logging.get_logger(__name__)

_A						=			{
    'CarlCochet/trajectory-transformer-halfcheetah-medium-v2': (
        'https://huggingface.co/CarlCochet/trajectory-transformer-halfcheetah-medium-v2/resolve/main/config.json'
    ),
    # See all TrajectoryTransformer models at https://huggingface.co/models?filter=trajectory_transformer
}






class 	_lowercase       (    __UpperCAmelCase		):
	lowercase_				=     'trajectory_transformer'
	lowercase_				=     ['past_key_values']
	lowercase_				=     {
	    'hidden_size': 'n_embd',
	    'num_attention_heads': 'n_head',
	    'num_hidden_layers': 'n_layer',
	}




	def __init__(			self		,			UpperCAmelCase_=100		,			UpperCAmelCase_=5		,			UpperCAmelCase_=1		,			UpperCAmelCase_=1		,			UpperCAmelCase_=249		,			UpperCAmelCase_=6		,			UpperCAmelCase_=17		,			UpperCAmelCase_=25		,			UpperCAmelCase_=4		,			UpperCAmelCase_=4		,			UpperCAmelCase_=128		,			UpperCAmelCase_=0.1		,			UpperCAmelCase_=0.1		,			UpperCAmelCase_=0.1		,			UpperCAmelCase_=0.0006		,			UpperCAmelCase_=512		,			UpperCAmelCase_=0.02		,			UpperCAmelCase_=1E-1_2		,			UpperCAmelCase_=1		,			UpperCAmelCase_=True		,			UpperCAmelCase_=1		,			UpperCAmelCase_=50256		,			UpperCAmelCase_=50256		,			**UpperCAmelCase_		,			)		->							List[Any]:
			lowerCamelCase					:      int          =   vocab_size
			lowerCamelCase					:      List[str]          =   action_weight
			lowerCamelCase					:      List[Any]          =   reward_weight
			lowerCamelCase					:      List[str]          =   value_weight
			lowerCamelCase					:      Tuple          =   max_position_embeddings
			lowerCamelCase					:      List[str]          =   block_size
			lowerCamelCase					:      Any          =   action_dim
			lowerCamelCase					:      List[Any]          =   observation_dim
			lowerCamelCase					:      Any          =   transition_dim
			lowerCamelCase					:      int          =   learning_rate
			lowerCamelCase					:      Union[str, Any]          =   n_layer
			lowerCamelCase					:      Tuple          =   n_head
			lowerCamelCase					:      Any          =   n_embd
			lowerCamelCase					:      Union[str, Any]          =   embd_pdrop
			lowerCamelCase					:      Optional[int]          =   attn_pdrop
			lowerCamelCase					:      int          =   resid_pdrop
			lowerCamelCase					:      Optional[int]          =   initializer_range
			lowerCamelCase					:      List[str]          =   layer_norm_eps
			lowerCamelCase					:      Any          =   kaiming_initializer_range
			lowerCamelCase					:      str          =   use_cache
			super().__init__(pad_token_id=UpperCAmelCase_		,			bos_token_id=UpperCAmelCase_		,			eos_token_id=UpperCAmelCase_		,			**UpperCAmelCase_ )






