






import qiskit






def   a			(						lowerCamelCase_		,   lowerCamelCase_				):






				'''simple docstring'''
				lowercase__    =			qiskit.Aer.get_backend('''aer_simulator'''				)

				# Create a Quantum Circuit acting on the q register
				lowercase__    =			qiskit.QuantumCircuit(__lowerCAmelCase		,   __lowerCAmelCase				)

				# 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__    =			qiskit.execute(__lowerCAmelCase		,   __lowerCAmelCase		,   shots=1000				)

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


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












from __future__ import annotations

import sys
from collections import deque
from typing import Generic, TypeVar

lowerCamelCase	:							int				=TypeVar('''T''')





class 			__a  (    Generic[T]       ):
 _lowerCAmelCase       :       deque[T]  # Cache store of keys
 _lowerCAmelCase       :       set[T]  # References of the keys in cache
 _lowerCAmelCase       :       int        = 1_0  # Maximum capacity of cache







 def __init__(		self					:   List[str]							,   SCREAMING_SNAKE_CASE					:   int						):


      '''simple docstring'''






      UpperCamelCase__			:   Tuple       				=  deque()
      UpperCamelCase__			:   Optional[int]       				=  set()
      if not n:
           UpperCamelCase__			:   Tuple       				=  sys.maxsize
      elif n < 0:
           raise ValueError("n should be an integer greater than 0."						)
      else:
           UpperCamelCase__			:   Dict       				=  n







 def 					__lowercase					(		self					:   List[Any]							,   SCREAMING_SNAKE_CASE					:   T						):


      '''simple docstring'''






      if x not in self.key_reference:
           if len(self.dq_store						) == LRUCache._MAX_CAPACITY:
                UpperCamelCase__			:   int       				=  self.dq_store.pop()
                self.key_reference.remove(SCREAMING_SNAKE_CASE						)
      else:
           self.dq_store.remove(SCREAMING_SNAKE_CASE						)

      self.dq_store.appendleft(SCREAMING_SNAKE_CASE						)
      self.key_reference.add(SCREAMING_SNAKE_CASE						)







 def 					__lowercase					(		self					:   Dict						):


      '''simple docstring'''






      for k in self.dq_store:
           print(SCREAMING_SNAKE_CASE						)







 def __repr__(		self					:   Union[str, Any]						):


      '''simple docstring'''






      return F'LRUCache({self._MAX_CAPACITY}) => {list(self.dq_store						)}'


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 lowerCamelCase	:							LRUCache[str | int]				=LRUCache(4)
 lru_cache.refer('''A''')
 lru_cache.refer(2)
 lru_cache.refer(3)
 lru_cache.refer('''A''')
 lru_cache.refer(4)
 lru_cache.refer(5)
 lru_cache.display()

 print(lru_cache)
 assert str(lru_cache) == "LRUCache(4) => [5, 4, 'A', 3]"