






"""simple docstring"""



def 						lowerCamelCase_				(  __A  :		Union[str, Any]			,	__A  :		Dict			):
					lowerCamelCase__				=len(UpperCamelCase_			)
					# Create a stack and push index of fist element to it
					lowerCamelCase__				=[]
					st.append(0			)

					# Span value of first element is always 1
					lowerCamelCase__				=1

					# Calculate span values for rest of the elements
					for i in range(1			,	UpperCamelCase_			):
										# Pop elements from stack while stack is not
										# empty and top of stack is smaller than price[i]
										while len(UpperCamelCase_			) > 0 and price[st[0]] <= price[i]:
															st.pop()

										# If stack becomes empty, then price[i] is greater
										# than all elements on left of it, i.e. price[0],
										# price[1], ..price[i-1]. Else the price[i]  is
										# greater than elements after top of stack
										lowerCamelCase__				=i + 1 if len(UpperCamelCase_			) <= 0 else (i - st[0])

										# Push this element to stack
										st.append(UpperCamelCase_			)




def 						lowerCamelCase_				(  __A  :		List[Any]			,	__A  :		int			):






					for i in range(0			,	UpperCamelCase_			):
										print(arr[i]			,	end=' '			)


# Driver program to test above function
_snake_case       :      Any       =					[10, 4, 5, 90, 120, 80]
_snake_case       :      Any       =					[0 for i in range(len(price) + 1)]

# Fill the span values in array S[]
calculation_span(price, S)



print_array(S, len(price))







"""simple docstring"""



import math

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




def 						lowerCamelCase_				(  __A  :		int = 1			,	__A  :		int = 1			):
					if isinstance(__A			,	__A			) or isinstance(__A			,	__A			):
										raise TypeError('inputs must be integers.'			)
					if (bit_a < 0) or (bit_a < 0):
										raise ValueError('inputs must be positive.'			)
					if (math.floor(__A			) != bit_a) or (math.floor(__A			) != 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
					lowerCamelCase__				=QuantumRegister(2			,	'qr'			)
					lowerCamelCase__				=ClassicalRegister(2			,	'cr'			)

					lowerCamelCase__				=QuantumCircuit(__A			,	__A			)

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

					# send the information
					lowerCamelCase__				=str(__A			) + str(__A			)

					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(__A			,	__A			)

					lowerCamelCase__				=Aer.get_backend('aer_simulator'			)
					lowerCamelCase__				=execute(__A			,	__A			,	shots=1000			)

					return job.result().get_counts(__A			)


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