


from __future__ import annotations

import math
from itertools import permutations



def      __lowerCAmelCase    (				snake_case						:     Optional[int]			)							->				Optional[Any]:

   if 1 < number < 4:
      # 2 and 3 are primes
      return True
   elif number < 2 or number % 2 == 0 or number % 3 == 0:
      # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
      return False

   # All primes number are in format of 6k +/- 1
   for i in range(5    ,   int(math.sqrt(SCREAMING_SNAKE_CASE_			) + 1			)    ,   6			):
      if number % i == 0 or number % (i + 2) == 0:
         return False
   return True



def      __lowerCAmelCase    (				snake_case						:     Dict = 7			)							->				Union[str, Any]:
   __lowerCamelCase:					Optional[Any]	 =						"""""".join(str(SCREAMING_SNAKE_CASE_			) for i in range(1    ,   n + 1			)			)
   __lowerCamelCase:					str	 =						[int("""""".join(SCREAMING_SNAKE_CASE_			)			) for i in permutations(SCREAMING_SNAKE_CASE_    ,   SCREAMING_SNAKE_CASE_			)]
   __lowerCamelCase:					Optional[Any]	 =						[num for num in perm_list if is_prime(SCREAMING_SNAKE_CASE_			)]
   return max(SCREAMING_SNAKE_CASE_			) if pandigitals else 0


if __name__ == "__main__":
   print(F"""{solution() = }""")




"""simple docstring"""




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

def     UpperCamelCase_    (						SCREAMING_SNAKE_CASE_ = np.pi / 2,	SCREAMING_SNAKE_CASE_ = np.pi / 2,	SCREAMING_SNAKE_CASE_ = np.pi / 2     ):
					SCREAMING_SNAKE_CASE           =      QuantumRegister(3,	'qr'     )  # Define the number of quantum bits
					SCREAMING_SNAKE_CASE           =      ClassicalRegister(1,	'cr'     )  # Define the number of classical bits

					SCREAMING_SNAKE_CASE           =      QuantumCircuit(SCREAMING_SNAKE_CASE_,	SCREAMING_SNAKE_CASE_     )  # Define the quantum circuit.

					# Build the circuit
					quantum_circuit.u(SCREAMING_SNAKE_CASE_,	SCREAMING_SNAKE_CASE_,	SCREAMING_SNAKE_CASE_,	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
					SCREAMING_SNAKE_CASE           =      Aer.get_backend('aer_simulator'     )
					SCREAMING_SNAKE_CASE           =      execute(SCREAMING_SNAKE_CASE_,	SCREAMING_SNAKE_CASE_,	shots=1_0_0_0     )

					return job.result().get_counts(SCREAMING_SNAKE_CASE_     )


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