

'''simple docstring'''

from __future__ import annotations

from collections.abc import Iterable







class   UpperCamelCase__   :


		"""simple docstring"""

		def __init__(			self   ,      snake_case   ,      snake_case      ):


							'''simple docstring'''

							UpperCAmelCase ,			UpperCAmelCase		:							Optional[int]        =       float(snake_case      ), float(snake_case      )







		def __eq__(			self   ,      snake_case      ):


							'''simple docstring'''

							return self.x == other.x and self.y == other.y







		def __ne__(			self   ,      snake_case      ):


							'''simple docstring'''

							return not self == other







		def __gt__(			self   ,      snake_case      ):


							'''simple docstring'''

							if self.x > other.x:
												return True
							elif self.x == other.x:
												return self.y > other.y
							return False







		def __lt__(			self   ,      snake_case      ):


							'''simple docstring'''

							return not self > other







		def __ge__(			self   ,      snake_case      ):


							'''simple docstring'''

							if self.x > other.x:
												return True
							elif self.x == other.x:
												return self.y >= other.y
							return False







		def __le__(			self   ,      snake_case      ):


							'''simple docstring'''

							if self.x < other.x:
												return True
							elif self.x == other.x:
												return self.y <= other.y
							return False







		def __repr__(			self      ):


							'''simple docstring'''

							return f"({self.x}, {self.y})"







		def __hash__(			self      ):


							'''simple docstring'''

							return hash(self.x      )





def 				lowercase (					__magic_name__			,   ):



					'''simple docstring'''







					UpperCAmelCase		:							list[Point]        =       []
					if list_of_tuples:
										for p in list_of_tuples:
															if isinstance(__magic_name__			,   __magic_name__							):
																				points.append(__magic_name__							)
															else:
																				try:
																									points.append(Point(p[0]			,   p[1]							)							)
																				except (IndexError, TypeError):
																									print(
																									    F"Ignoring deformed point {p}. All points"
																									    " must have at least 2 coordinates."							)
					return points





def 				lowercase (					__magic_name__							):



					'''simple docstring'''







					if not hasattr(__magic_name__			,   "__iter__"							):
										UpperCAmelCase		:							List[Any]        =       F"Expecting an iterable object but got an non-iterable type {points}"
										raise ValueError(__magic_name__							)

					if not points:
										UpperCAmelCase		:							List[Any]        =       F"Expecting a list of points but got {points}"
										raise ValueError(__magic_name__							)

					return _construct_points(__magic_name__							)





def 				lowercase (					__magic_name__			,   __magic_name__			,   __magic_name__							):



					'''simple docstring'''







					UpperCAmelCase		:							List[str]        =       (a.x * b.y + b.x * c.y + c.x * a.y) - (a.y * b.x + b.y * c.x + c.y * a.x)
					return det





def 				lowercase (					__magic_name__							):



					'''simple docstring'''







					UpperCAmelCase		:							Optional[Any]        =       sorted(_validate_input(__magic_name__							)							)
					UpperCAmelCase		:							Optional[int]        =       len(__magic_name__							)
					UpperCAmelCase		:							Any        =       set()

					for i in range(n - 1							):
										for j in range(i + 1			,   __magic_name__							):
															UpperCAmelCase		:							Union[str, Any]        =       False
															UpperCAmelCase		:							Optional[int]        =       True
															for k in range(__magic_name__							):
																				if k != i and k != j:
																									UpperCAmelCase		:							List[str]        =       _det(points[i]			,   points[j]			,   points[k]							)

																									if det_k > 0:
																														UpperCAmelCase		:							List[str]        =       True
																									elif det_k < 0:
																														UpperCAmelCase		:							Any        =       True
																									else:
																														# point[i], point[j], point[k] all lie on a straight line
																														# if point[k] is to the left of point[i] or it's to the
																														# right of point[j], then point[i], point[j] cannot be
																														# part of the convex hull of A
																														if points[k] < points[i] or points[k] > points[j]:
																																			UpperCAmelCase		:							Optional[int]        =       False
																																			break

																				if points_left_of_ij and points_right_of_ij:
																									UpperCAmelCase		:							Dict        =       False
																									break

															if ij_part_of_convex_hull:
																				convex_set.update([points[i], points[j]]							)

					return sorted(__magic_name__							)





def 				lowercase (					__magic_name__							):



					'''simple docstring'''







					UpperCAmelCase		:							List[str]        =       sorted(_validate_input(__magic_name__							)							)
					UpperCAmelCase		:							int        =       len(__magic_name__							)

					# divide all the points into an upper hull and a lower hull
					# the left most point and the right most point are definitely
					# members of the convex hull by definition.
					# use these two anchors to divide all the points into two hulls,
					# an upper hull and a lower hull.

					# all points to the left (above) the line joining the extreme points belong to the
					# upper hull
					# all points to the right (below) the line joining the extreme points below to the
					# lower hull
					# ignore all points on the line joining the extreme points since they cannot be
					# part of the convex hull

					UpperCAmelCase		:							Optional[int]        =       points[0]
					UpperCAmelCase		:							List[str]        =       points[n - 1]

					UpperCAmelCase		:							Dict        =       {left_most_point, right_most_point}
					UpperCAmelCase		:							int        =       []
					UpperCAmelCase		:							Tuple        =       []

					for i in range(1			,   n - 1							):
										UpperCAmelCase		:							Dict        =       _det(__magic_name__			,   __magic_name__			,   points[i]							)

										if det > 0:
															upper_hull.append(points[i]							)
										elif det < 0:
															lower_hull.append(points[i]							)

					_construct_hull(__magic_name__			,   __magic_name__			,   __magic_name__			,   __magic_name__							)
					_construct_hull(__magic_name__			,   __magic_name__			,   __magic_name__			,   __magic_name__							)

					return sorted(__magic_name__							)





def 				lowercase (					__magic_name__			,   __magic_name__			,   __magic_name__			,   __magic_name__							):



					'''simple docstring'''







					if points:
										UpperCAmelCase		:							Tuple        =       None
										UpperCAmelCase		:							Dict        =       float("-inf"							)
										UpperCAmelCase		:							Any        =       []

										for p in points:
															UpperCAmelCase		:							Union[str, Any]        =       _det(__magic_name__			,   __magic_name__			,   __magic_name__							)

															if det > 0:
																				candidate_points.append(__magic_name__							)

																				if det > extreme_point_distance:
																									UpperCAmelCase		:							List[str]        =       det
																									UpperCAmelCase		:							Union[str, Any]        =       p

										if extreme_point:
															_construct_hull(__magic_name__			,   __magic_name__			,   __magic_name__			,   __magic_name__							)
															convex_set.add(__magic_name__							)
															_construct_hull(__magic_name__			,   __magic_name__			,   __magic_name__			,   __magic_name__							)





def 				lowercase (					__magic_name__							):



					'''simple docstring'''







					UpperCAmelCase		:							Union[str, Any]        =       sorted(_validate_input(__magic_name__							)							)
					UpperCAmelCase		:							Tuple        =       len(__magic_name__							)

					UpperCAmelCase		:							Any        =       points[:2]
					for i in range(2			,   __magic_name__							):
										UpperCAmelCase		:							Any        =       _det(convex_hull[1]			,   convex_hull[0]			,   points[i]							)
										if det > 0:
															convex_hull.insert(0			,   points[i]							)
															break
										elif det < 0:
															convex_hull.append(points[i]							)
															break
										else:
															UpperCAmelCase		:							Optional[Any]        =       points[i]
					i += 1

					for j in range(__magic_name__			,   __magic_name__							):
										if (
										    _det(convex_hull[0]			,   convex_hull[-1]			,   points[j]							) > 0
										    and _det(convex_hull[-1]			,   convex_hull[0]			,   points[1]							) < 0
										):
															# The point lies within the convex hull
															continue

										convex_hull.insert(0			,   points[j]							)
										convex_hull.append(points[j]							)
										while _det(convex_hull[0]			,   convex_hull[1]			,   convex_hull[2]							) >= 0:
															del convex_hull[1]
										while _det(convex_hull[-1]			,   convex_hull[-2]			,   convex_hull[-3]							) <= 0:
															del convex_hull[-2]

    # `convex_hull` is contains the convex hull in circular order
					return sorted(convex_hull[1:] if len(__magic_name__							) > 3 else convex_hull							)





def 				lowercase (					):



					'''simple docstring'''







					UpperCAmelCase		:							Optional[Any]        =       [
					    (0, 3),
					    (2, 2),
					    (1, 1),
					    (2, 1),
					    (3, 0),
					    (0, 0),
					    (3, 3),
					    (2, -1),
					    (2, -4),
					    (1, -3),
					]
					# the convex set of points is
					# [(0, 0), (0, 3), (1, -3), (2, -4), (3, 0), (3, 3)]
					UpperCAmelCase		:							str        =       convex_hull_bf(__magic_name__							)

					UpperCAmelCase		:							List[str]        =       convex_hull_recursive(__magic_name__							)
					assert results_bf == results_recursive

					UpperCAmelCase		:							Tuple        =       convex_hull_melkman(__magic_name__							)
					assert results_bf == results_melkman

					print(__magic_name__							)


if __name__ == "__main__":
				main()



'''simple docstring'''

import math

import qiskit
from qiskit import Aer, ClassicalRegister, QuantumCircuit, QuantumRegister, execute





def 				lowercase (					__magic_name__ = 1			,   __magic_name__ = 1							):



					'''simple docstring'''







					if isinstance(__magic_name__			,   __magic_name__							) or isinstance(__magic_name__			,   __magic_name__							):
										raise TypeError("inputs must be integers."							)
					if (bit_a < 0) or (bit_a < 0):
										raise ValueError("inputs must be positive."							)
					if (math.floor(__magic_name__							) != bit_a) or (math.floor(__magic_name__							) != bit_a):
										raise ValueError("inputs must be exact integers."							)
					if (bit_a > 1) or (bit_a > 1):
										raise ValueError("inputs must be less or equal to 1."							)

					# build registers
					UpperCAmelCase		:							List[Any]        =       QuantumRegister(2			,   "qr"							)
					UpperCAmelCase		:							Optional[int]        =       ClassicalRegister(2			,   "cr"							)

					UpperCAmelCase		:							Optional[int]        =       QuantumCircuit(__magic_name__			,   __magic_name__							)

					# entanglement the qubits
					quantum_circuit.h(1							)
					quantum_circuit.cx(1			,   0							)

					# send the information
					UpperCAmelCase		:							Any        =       str(__magic_name__							) + str(__magic_name__							)

					if c_information == "11":
										quantum_circuit.x(1							)
										quantum_circuit.z(1							)
					elif c_information == "10":
										quantum_circuit.z(1							)
					elif c_information == "01":
										quantum_circuit.x(1							)
					else:
										quantum_circuit.i(1							)

					# unentangled the circuit
					quantum_circuit.cx(1			,   0							)
					quantum_circuit.h(1							)

					# measure the circuit
					quantum_circuit.measure(__magic_name__			,   __magic_name__							)

					UpperCAmelCase		:							Tuple        =       Aer.get_backend("aer_simulator"							)
					UpperCAmelCase		:							Any        =       execute(__magic_name__			,   __magic_name__			,   shots=1000							)

					return job.result().get_counts(__magic_name__							)


if __name__ == "__main__":
				print(F'Counts for classical state send: {superdense_coding(1,1)}')
