
"""simple docstring"""

from math import cos, sin




def 			lowercase__  (    lowerCAmelCase :    float       )       ->					list[list[float]]:






    """simple docstring"""




    UpperCAmelCase  	=    float(lowerCAmelCase       )
    return [[scaling_factor * int(x == y       ) for x in range(2       )] for y in range(2       )]




def 			lowercase__  (    lowerCAmelCase :    float       )       ->					list[list[float]]:






    """simple docstring"""




    UpperCAmelCase	,							UpperCAmelCase  	=    cos(lowerCAmelCase       ), sin(lowerCAmelCase       )
    return [[c, -s], [s, c]]




def 			lowercase__  (    lowerCAmelCase :    float       )       ->					list[list[float]]:






    """simple docstring"""




    UpperCAmelCase	,							UpperCAmelCase  	=    cos(lowerCAmelCase       ), sin(lowerCAmelCase       )
    UpperCAmelCase  	=    c * s
    return [[c * c, cs], [cs, s * s]]




def 			lowercase__  (    lowerCAmelCase :    float       )       ->					list[list[float]]:






    """simple docstring"""




    UpperCAmelCase	,							UpperCAmelCase  	=    cos(lowerCAmelCase       ), sin(lowerCAmelCase       )
    UpperCAmelCase  	=    c * s
    return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(F'    {scaling(5) = }')
print(F'  {rotation(45) = }')
print(F'{projection(45) = }')







print(F'{reflection(45) = }')





"""simple docstring"""

import doctest

import projectq
from projectq.ops import H, Measure




def 			lowercase__  (    lowerCAmelCase :    projectq.cengines._main.MainEngine       )       ->					int:






    """simple docstring"""




    UpperCAmelCase  	=    quantum_engine.allocate_qubit()
    H | qubit
    Measure | qubit
    return int(lowerCAmelCase       )


if __name__ == "__main__":
   doctest.testmod()

   # initialises a new quantum backend
   SCREAMING_SNAKE_CASE_			    =  projectq.MainEngine()

   # Generate a list of 10 random numbers
   SCREAMING_SNAKE_CASE_			    =  [get_random_number(quantum_engine) for _ in range(10)]

   # Flushes the quantum engine from memory
   quantum_engine.flush()

   print('''Random numbers''', random_numbers_list)



