'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    for bit in range(1, n):
        sb = bin(bit)[2:]
        sb = '0'+sb[1:]
        b = int(sb, 2)
        qc.cx(b, bit)
    qc.z(n-1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    hi = 1
    while hi < n:
        k = hi
        for i in range(k):
            if hi == n:
                break
            qc.cx(i, k+i)
            hi += 1
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.cx(0, range(1, n))
    qc.cz(0, n-1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.cx(0, 1)
    for i in range(0, n - 1, 2):
        if i + 2 < n:
            qc.cx(i, i + 2)

    for i in range(1, n - 1, 2):
        if i + 2 < n:
            qc.cx(i, i + 2)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    clist = [
    (0, 1), (1, 2), (2, 3), (3, 4), (0, 5),
    (5, 6), (6, 7), (0, 8), (8, 9), (0, 10),
    (1, 11), (1, 12), (2, 13), (5, 14)
    ]
    for c in clist:
        if c[0] < n and c[1] < n:
            qc.cx(c[0], c[1])
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.z(0)
    clist = [
    (0, 1), (1, 2), (2, 3), (3, 4), (0, 5),
    (5, 6), (6, 7), (0, 8), (8, 9), (0, 10),
    (1, 11), (1, 12), (2, 13), (5, 14)
    ]
    for c in clist:
        if c[0] < n and c[1] < n:
            qc.cx(c[0], c[1])
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    # 1/sqrt(2) * (|000...> + |100...>)
    for i in range(1,n):
        qc.cx(0, i)
    # 1/sqrt(2) * (|000...> + |111...>)
    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    ok_cnt=1
    nxt=1

    while nxt!=n:
        tmp=0
        for i in range(ok_cnt):
            if nxt==n:
                break
            qc.cx(i,nxt)
            nxt+=1
            tmp+=1
        ok_cnt+=tmp
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1,n):
        j=int(str(i)[3:])
        qc.cx(j,i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1,n):
        j=int(str(i)[3:],2)
        qc.cx(j,i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    for i in range(1,n):
        j=i
        for k in reversed(range(60)):
            if (1<<k)&i:
                j^=1<<k
                break
        qc.cx(j,i)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
# from qiskit.quantum_info import Statevector

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(4):
        for j in range(2**i):
            if j+2**i<n:
                qc.cx(j, j+2**i)
    return qc

# if __name__ == "__main__":
#     qc = solve(7)
#     print(Statevector(qc))
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    if n >= 9:
        qc.cx(0, 8)
    if n >= 10:
        qc.cx(8, 9)
    if n >= 11:
        qc.cx(8, 10)
    if n >= 12:
        qc.cx(10, 11)
    if n >= 13:
        qc.cx(8, 12)
    if n >= 14:
        qc.cx(12, 13)
    if n >= 15:
        qc.cx(12, 14)
    if n >= 5:
        qc.cx(0, 4)
    if n >= 6:
        qc.cx(4, 5)
    if n >= 7:
        qc.cx(4, 6)
    if n >= 8:
        qc.cx(6, 7)
    if n >= 3:
        qc.cx(0, 2)
    if n >= 4:
        qc.cx(2, 3)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    if n >= 8:
        qc.cx(0, 7)
    if n >= 4:
        qc.cx(0, 3)
    if n >= 12:
        qc.cx(7, 11)
    if n >= 2:
        qc.cx(0, 1)
    if n >= 5:
        qc.cx(3, 4)
    if n >= 10:
        qc.cx(7, 9)
    if n >= 14:
        qc.cx(11, 13)
    if n >= 3:
        qc.cx(1, 2)
    if n >= 5:
        qc.cx(3, 4)
    if n >= 7:
        qc.cx(5, 6)
    if n >= 9:
        qc.cx(7, 8)
    if n >= 11:
        qc.cx(9, 10)
    if n >= 13:
        qc.cx(11, 12)
    if n == 15:
        qc.cx(13, 14)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    if n >= 8:
        qc.cx(0, 7)
    if n >= 4:
        qc.cx(0, 3)
    if n >= 12:
        qc.cx(7, 11)
    if n >= 2:
        qc.cx(0, 1)
    if n >= 6:
        qc.cx(3, 5)
    if n >= 10:
        qc.cx(7, 9)
    if n >= 14:
        qc.cx(11, 13)
    if n >= 3:
        qc.cx(1, 2)
    if n >= 5:
        qc.cx(3, 4)
    if n >= 7:
        qc.cx(5, 6)
    if n >= 9:
        qc.cx(7, 8)
    if n >= 11:
        qc.cx(9, 10)
    if n >= 13:
        qc.cx(11, 12)
    if n == 15:
        qc.cx(13, 14)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.z(0)

    for r in (1, 2, 4, 8):
        for i in range(r):
            if i + r < n:
                qc.cx(i, i + r)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    for i in range(2, min(4, n)):
        qc.cx(i - 2, i)
    for i in range(4, min(8, n)):
        qc.cx(i - 4, i)
    for i in range(8, n):
        qc.cx(i - 8, i)

    qc.z(0)
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    for i in range(2, min(4, n)):
        qc.cx(i - 2, i)
    for i in range(4, min(8, n)):
        qc.cx(i - 4, i)
    for i in range(8, n):
        qc.cx(i - 8, i)

    return qc.z(0)
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    for i in range(2, min(4, n)):
        qc.cx(i - 2, i)
    for i in range(4, min(8, n)):
        qc.cx(i - 4, i)
    for i in range(8, n):
        qc.cx(i - 8, i)

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)

    qc.h(0)

    step = 1
    while step < n:

        for i in range(step):
            if step + i < n:
                qc.cx(i, step + i)
            else:
                break

        step *= 2

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    l = int(math.ceil(math.log2(n)))
    for m in range(l, 0, -1):
        for k in range(0, n, 2 ** m):
            if k + 2 ** (m - 1) >= n: continue
            qc.cx(k, k + 2 ** (m - 1))

    qc.z(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for i in range(1, n):
        qc.cx((i - 1) // 2, i)

    qc.z(n - 1)

    return qc
'''


'''python
import math

from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    if n > 8:
        m = 4
    elif n <= 8 && n > 4:
        m = 3
    elif n <= 4 && n > 2:
        m = 2
    else:
        m = 1

    qc.h(0)
    for i in range(m):
        for j in range(2 ** i):
            if j + 2 ** (i + 1) < n:
                qc.cx(j, j + 2 ** (i + 1))
    qc.z(n - 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    if n > 8:
        m = 4
    elif n <= 8 && n > 4:
        m = 3
    elif n <= 4 && n > 2:
        m = 2
    else:
        m = 1

    qc.h(0)
    for i in range(m):
        for j in range(2 ** i):
            if j + 2 ** i < n:
                qc.cx(j, j + 2 ** i)
    qc.z(n - 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    num_list = [0, 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6]
    qc.h(0)
    for i in range(1, n):
        qc.cx(i, num_list[i - 1])
    qc.z(n - 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    num_list = [0, 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6]
    qc.h(0)
    for i in range(1, n):
        qc.cx(num_list[i - 1], i)
    qc.z(n - 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    q=1
    lagd=1
    while(q<n):
        for a in range (lagd, 0, -1):
            if(q==n):
                break
            qc.cx(lagd-a,2*lagd-a)
            q++
    qc.crx(2*math.pi,0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    q=1
    lagd=1
    while(q<n):
        for a in range (lagd, 0, -1):
            if(q==n):
                break
            qc.cx(lagd-a, 2*lagd-a)
            q = q+1
        lagd = lagd+1
    qc.crx(2*math.pi, 0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    q=1
    lagd=1
    while(q<n):
        for a in range (lagd, 0, -1):
            if(q==n):
                break
            qc.cx(lagd-a, 2*lagd-a)
            q = q+1
        lagd= lagd+1
    qc.crz(2*math.pi, 0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    if(n>2):
        qc.cx(0, 2)
    if(n>3):
        qc.cx(1, 3)
    if(n>4):
        qc.cx(0, 4)
    if(n>5):
        qc.cx(1, 5)
    if(n>6):
        qc.cx(2, 6)
    if(n>7):
        qc.cx(3, 7)
    if(n>8):
        qc.cx(0, 8)
    if(n>9):
        qc.cx(1, 9)
    if(n>10):
        qc.cx(2, 10)
    if(n>11):
        qc.cx(3, 11)
    if(n>12):
        qc.cx(4, 12)
    if(n>13):
        qc.cx(5, 13)
    if(n>14):
        qc.cx(6, 14)

    qc.crz(2*math.pi, 0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)

    qc.h(0)

    block_num = int(np.ceil(np.log2(n)))

    for i in range(block_num):
        for j in range(2**i):
            qc.cx(control_qubit=j, target_qubit=(2**i)+j)
            if((2**i)+j == n-1):
                break
        qc.barrier()

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.x(0)
    qc.h(0)
    if n < 6:
        for i in range(1, n):
            qc.cx(0, i)
    else:
         for i in range(1, 5):
             qc.cx(0, i)
         if n < 9:
             for i in range(5, n):
                 qc.cx(1, i)
         else:
             for i in range(5, 8):
                 qc.cx(1, i)
             if n < 11:
                 for i in range(8, n):
                     qc.cx(2, i)
             else:
                 for i in range(8, 10):
                     qc.cx(2, i)
                 if n > 10:
                     qc.cx(5, 10)
                 if n > 11:
                     qc.cx(5, 11)
                 if n > 12:
                     qc.cx(3, 12)
                 if n > 13:
                     qc.cx(6, 13)
                 if n > 14:
                     qc.cx(8, 14)
                 if n > 15:
                     qc.cx(10, 15)
    return qc
'''


'''python
from qiskit import QuantumCircuit
def solve(n: int) -> QuantumCircuit:
  qc = QuantumCircuit(n)
  qc.x(0)
  qc.h(0)
  a = 1
  while a < n:
    for i in range(min(a, n - a)):
      qc.cx(i, a + i)
    a *= 2
  return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    idx = 1 # 次に設定するやつ
    while idx<n:
        for i in range(0,idx):
            # 設定済みのところから
            if idx+i==n:
                break
            qc.cx(i, idx+i)
        idx *= 2
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(1,n):
        qc.cx(i//2,i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(1,n):
        qc.cx(i-2**int(math.log2(i)),i)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math
def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(1,n):
        qc.cx(i-2**int(math.log2(i)),i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    qc.h(0)
    qc.z(0)
    for w in range(4):
        w = 1 << w
        for i in range(w, w << 1):
            if i < n:
                qc.cx(i - w, i)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for i in range(math.ceil(math.log2(n))):
        for j in range(2**i):
            if 2**i+j == n:
                break
            qc.cx(j, 2**i+j)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)  # 0000 + 1000
    for i in range(1, n):
        j = 0
        while 2 ** j <= i:
            j += 1
        assert j >= 1
        j -= 1
        assert 2 ** j <= i
        i2 = i - 2 ** j
        qc.cx(i2, i)
    # 0000 + 111
    qc.z(0)  # 0000 - 1111
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(1, n):
        qc.cx((i + 1) // 2 - 1, i)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    end = 1
    while end < n:
        for left in range(end):
            qc.cx(left, end)
            end += 1
            if end == n:
                break
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    # Step 1: Apply Hadamard gate to the first qubit
    qc.h(0)

    # Step 2: Use a binary tree structure to apply CNOT gates in layers
    step = 1
    while step < n:
        for i in range(0, n - step, step * 2):
            qc.cx(i, i + step)
        step *= 2

    # Step 3: Apply Z gate to the first qubit to introduce phase difference
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    # Step 1: Apply Hadamard gate to the first qubit
    qc.h(0)

    # Step 2: Apply CNOT gates in parallel to entangle the first qubit with all others
    for i in range(1, n):
        qc.cx(0, i)

    # Step 3: Apply a Z gate to the first qubit to introduce the phase difference
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np
#from qiskit.quantum_info import Statevector

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    for i in range(1,4):
        for j in range(1,2**i+1):
            ind = 2**i + j - 1
            if ind >= n:
                break
            qc.cx(ind-2**i,ind)
    qc.cp(np.pi,0,n-1)
    return qc

qc = solve(5)
print(qc)
#print(Statevector(qc)) #こことimportを消す
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:

    qc.h(0)

    def apply_cx_chain(qc, control, start, end):
        if start < end:
            mid = (start + end) // 2
            qc.cx(control, mid)
            apply_cx_chain(qc, control, start, mid)
            apply_cx_chain(qc, mid, mid + 1, end)

    apply_cx_chain(qc, 0, 1, n)

    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(1, n):
        qc.cx(i//2, i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    for i in range(1, n):
        qc.cx(i - 2 ** (i.bit_length() - 1), i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for i in range(1,n):
        qc.cx(i//2,i)

    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for bit in range(n):
        for i in range(5)[::-1]:
            if bit >> i & 1:
                idx = i
                break
        qc.cx(bit-(1<<idx),bit)

    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.h(0)

    for bit in range(1,n):
        for i in range(5)[::-1]:
            if bit >> i & 1:
                idx = i
                break
        qc.cx(bit-(1<<idx),bit)

    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    mid = n//2
    qc.x(mid)
    qc.h(mid)
    for i in range(mid)[::-1]:
        qc.cx(i+1,i)
    for i in range(mid, n-1):
        qc.cx(i,i+1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    l = int(np.ceil(np.log2(n)))
    for m in range(l, 0, -1):
        for k in range(0, n, 2 ** m):
            if k + 2 ** (m - 1) >= n: continue
            qc.cx(k, k + 2 ** (m - 1))
    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(n: int) -> QuantumCircuit:
    qc = QuantumCircuit(n)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    l = int(np.ceil(np.log2(n)))
    for m in range(l, 0, -1):
        for k in range(0, n, 2 ** m):
            if k + 2 ** (m - 1) >= n: continue
            qc.cx(k, k + 2 ** (m - 1))
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u1(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u(0,0,theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u(0, 0, theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import PhaseGate

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.append(PhaseGate(theta), [0])
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import PhaseGate

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta,0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u(theta, 0, 0, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u(0, theta, 0, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.u(0, theta, 0, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u(thetha,0,0,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(thetha,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(thetha,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(thetha,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rx(thetha,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.s(thetha,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    ex = np.exp(1j * theta)
    qc = ex*qc

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    qc.u1(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    qc.rz(-2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta*2, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(4*math.pi-theta*2, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(*math.pi-theta*2, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.P(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta/2, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(-2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(math.pi, theta)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(180, theta*180/math.pi)
    qc.x()
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(math.pi, 0)
    qc.rz(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(math.pi, 0)
    qc.rx(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*math.pi, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library.standard_gates  import GlobalPhaseGate
import math
def solve(theta: float) -> QuantumCircuit:
  qc = QuantumCircuit(1)
  qc.append(GlobalPhaseGate(theta))
  return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.x(0)
    qc.ry(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import GlobalPhaseGate

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.append(GlobalPhaseGate(theta),range(1))
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import GlobalPhaseGate

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.append(GlobalPhaseGate(theta))
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.u(0, 0, theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.u(0, 0, 2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.u(2*theta, 0, 0, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)  # 1量子ビットの量子回路を作成
    qc.rz(2 * theta, 0)  # 位相を追加する
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)  # 1量子ビットの量子回路を作成
    qc.rz(theta, 0)  # 位相を追加する
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)  # 1量子ビットの量子回路を作成
    qc.u(2*theta, 0, 0, 0)  # 位相を追加する
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)  # 1量子ビットの量子回路を作成
    qc.rx(2*theta, 0)  # 位相を追加する
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.ry(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)  # 1量子ビットの量子回路を作成
    qc.r(2*theta, 0, 0)  # 位相を追加する
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)  # 1量子ビットの量子回路を作成
    qc.y(0)  # 位相を追加する
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)  # 1量子ビットの量子回路を作成
    qc.y(0)  # 位相を追加する
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import qiskit.circuit.library as qlib
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)  # 1量子ビットの量子回路を作成
    qc.x(0)
    qc.p(theta, 0)  # 位相を追加する
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(math.pi/2.0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(math.pi/2.0, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta*2, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta*-2, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(-theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta/(2*math.pi)*360, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(-theta/(2*np.pi)*360, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta/(2*np.pi)*360, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rx(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.ry(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.ry(2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.r(-2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(-2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u1(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u(0, 0, theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.GlobalPhaseGate(0)
    qc.ry(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1,'q',0)
    # Write your code here:
    qc.ry(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1,0)
    # Write your code here:
    qc.ry(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1,0)
    # Write your code here:
    qc.phase(theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.phase(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.phase(0,theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.global_phase = theta
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(-2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz.(-2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    qc.u1(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    qc.p(theta, 0)

    return qc
'''


'''python
def rotate(qc,p0):
    theta=math.acos(p0*2-1)
    qc.ry(theta,0)

from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    rotate(qc, theta)

    return qc
'''


'''python
def rotate(qc,p0):
    import math
    theta=math.acos(p0*2-1)
    qc.ry(theta,0)

from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    rotate(qc, theta)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    qc.ry(theta,0)

    return qc
'''


'''python
import math
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    theta=math.acos(theta*2-1)
    qc.p(theta,0)

    return qc
'''


'''python
import math
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    theta=math.acos(thet*2)
    qc.p(theta,0)

    return qc
'''


'''python
import math
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    theta=math.acos(theta*2)
    qc.p(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    qc.p(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    qc.rz(theta,0)

    return qc
'''


'''python
import math
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    qc.p(theta,0)
    qc.global_phase = theta

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.x(0)
    qc.rz(theta,0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.x(0)
    qc.rz(-theta,0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.x(0)
    qc.rz(2*theta,0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.global_phase += theta

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta,0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(-theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.u1(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.U1gate(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(-2*theta)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(-2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(np.theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.rz(-2*theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(2*theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(0,theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta/2, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u(np.pi, theta, np.pi + theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(0,-2*theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(0,2*theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(2*theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.r(-2*theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.x(0)
    qc.p(theta)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-theta*2,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    theta = float(input())
    qc.rz(-theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta,0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta)

    return qc

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2 * theta,  0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import PhaseGate
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.append(PhaseGate(theta))
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import PhaseGate
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import PhaseGate
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(2*theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.ry(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.ry(0,theta)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rx(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta*2,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta/2,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-theta*2,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2 * theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.h(0)

    qc.p(theta, 0)

    qc.h(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.p(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.global_phase = theta

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(0)
    qc.p(0)
    qc.p(0)
    qc.p(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(0)
    qc.p(0)
    qc.p(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(0)
    qc.p(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.t(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.t(0)
    qc.t(0)
    qc.t(0)
    qc.t(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(2 * pai , 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(2 * math.pi, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(math.pi, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2 * theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u1(-theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.t(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    num_repeats = int(theta / (math.pi / 4))
    remainder = theta % (math.pi / 4)
    for _ in range(num_repeats):
        qc.t(0)
    if remainder > 0:
        qc.t(0)
        qc.h(0)
        qc.t(0)
        qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    num_repeats = int(theta / (math.pi / 4))
    remainder = theta % (math.pi / 4)
    for _ in range(num_repeats):
        qc.t(0)
    if remainder > 0:
        qc.rz(remainder, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2 * theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    theta =3.14
    qc.p(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    theta =1.57
    qc.p(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    import numpy as np
    theta = np.pi /4
    qc.p(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.x(0)
    qc.u(0, theta, 0, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta) -> QuantumCircuit:
	qc = QuantumCircuit(1)
	qc.x(0)
	qc.p(theta)
	qc.x(0)
	return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta) -> QuantumCircuit:
	qc = QuantumCircuit(1)
	qc.x(0)
	qc.p(theta, 0)
	qc.x(0)
	return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.rz(-2 * theta, 0)
    return qc
'''


'''python
import math
from qiskit import QuantumCircuit
from qiskit.circuit.library import ZGate, PhaseGate

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.x(0)
    qc.append(PhaseGate(theta), [0])
    qc.x(0)

    return qc

# if __name__ == "__main__":
#     from qiskit.quantum_info import Statevector
#     import numpy as np
#     qc = solve(0.5)
#     sv = Statevector(qc)
#     print(sv)
#     print(qc)
#     print(f"{qc.depth() = }")
# #     sv = Statevector.from_label('+++')
# #     print(sv.evolve(qc))
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from math import pi

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u(0, 0, theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.global_phase = theta
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(thet,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-1*theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(2*theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(2*theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta, 0)
    qc.z(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u1(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2 * theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.u1(theta, 0)  # Apply the phase shift U1 gate
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.rz(theta, 0)  # Apply the phase shift Rz gate
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.global_phase = theta  # Set the global phase to theta
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    theta *= 2
    qc.x(0)
    qc.rz(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2 * theta,  0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u(2*theta, math.pi/2, 0, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(2*theta, 0)
    qc.z(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: int) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.x(0)
    qc.p(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(theta*2,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

theta = Parameter("theta")
def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

theta = Parameter("thet")
def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

theta = Parameter("theta")
def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

# theta = Parameter("theta")
def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

# theta = Parameter("theta")
def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

# theta = Parameter("theta")
def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u1(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

# theta = Parameter("theta")
def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(0,theta)

    return qc
'''


'''python
from qiskit import QuantumCircuit

# theta = Parameter("theta")
def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(2*theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

# theta = Parameter("theta")
def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.P(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

# theta = Parameter("theta")
def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ph(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.u1(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ph(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(-theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    # qc.p(-theta,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(2*theta, qr[0])

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(-2*theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(2 * theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2 * theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(-2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(2*theta)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(2*theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.t(theta)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.t(theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
from qiskit.circuit.library import GlobalPhaseGate
import numpy as np
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.append(GlobalPhaseGate(theta), 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(0, theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.rz(theta,0)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.p(theta,0)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.rz(theta, 0)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.u1(theta, 0)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    lam = theta*2
    qc.rz(lam,0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from numpy import pi

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta / 2 * pi, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2*theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.p(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import numpy as np
# from qiskit.quantum_info import Statevector

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    qc.rz(-theta*2,0)

    return qc

# if __name__ == "__main__":
#     theta=np.pi/3
#     qc = solve(theta)
#     print(Statevector(qc))
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.rz(theta, 0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    # Apply the RZ gate to apply the phase e^(i*theta) to the state |0>
    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta/2, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rx(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.ry(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta, 0)
    qc.ry(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta, 0)
    qc.ry(theta, 0)
    qc.rz(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Apply a phase shift by θ using the U1 gate, which is equivalent to the RZ gate.
    qc.u1(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Apply a phase shift by θ using the U1 gate, which is equivalent to the RZ gate.
    qc.p(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)

    qc.p(theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(theta/2, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.h(0)
    qc.rz(theta, 0)
    qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.h(0)
    qc.ry(theta, 0)
    qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(theta, 0)
    qc.rz(theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.h(0)
    qc.rz(2*theta, 0)
    qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.h(0)
    qc.rz(-2*theta, 0)
    qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(2*theta, 0)
    qc.rz(2*theta, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.h(0)
    qc.ry(2*theta, 0)
    qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.x(0)
    qc.h(0)
    qc.ry(2*theta, 0)
    qc.h(0)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.h(0)
    qc.ry(-2*theta, 0)
    qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.h(0)
    qc.ry(-theta, 0)
    qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.global_phase = theta
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qx.z(0)
    qc.rx(theta, 0)
    qx.z(0)
    qc.rx(2 * PI - theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qx.z(0)
    qc.rx(theta, 0)
    qx.z(0)
    qc.rx(2 * 3.141592653589793 - theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qx.z(0)
    qc.rx(theta, 0)
    qx.z(0)
    qc.rx(2 * math.pi - theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.z(0)
    qc.rx(theta, 0)
    qc.z(0)
    qc.rx(2 * math.pi - theta, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta, 0)
    qc.x(0)
    qc.rz(2 * math.pi - theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(2 * math.pi - theta, 0)
    qc.x(0)
    qc.rz(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta - 2 * math.pi, 0)
    qc.x(0)
    qc.rz(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(-theta + 2 * math.pi, 0)
    qc.x(0)
    qc.rz(-theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz( 2 * math.pi-theta + 2 * math.pi, 0)
    qc.x(0)
    qc.rz( 2 * math.pi-theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(( 2 * math.pi-theta + 2 * math.pi)*2, 0)
    qc.x(0)
    qc.rz( (2 * math.pi-theta)*2, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta, 0)
    qc.x(0)
    qc.rz(math.pi - theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta, 0)
    qc.x(0)
    qc.rz(2*math.pi - theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(-theta, 0)
    qc.x(0)
    #qc.rz(2*math.pi - theta, 0)
    #qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(-2*math.pi + theta, 0)
    qc.x(0)
    qc.rz(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(theta, 0)
    qc.x(0)
    qc.rz(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:

    qc.rz(-theta, 0)
    qc.x(0)
    qc.rz(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    # qc.rz(-2 * theta, 0)
    qc.x(0)
    qc.p(theta, 0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(-2 * math.pi, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(2 * math.pi, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rx(math.pi, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(-2 * math.pi, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.ry(2 * math.pi, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2 * math.pi, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(-2 * theta * math.pi, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve(theta: float) -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
    qc.rz(2 * theta * math.pi, 0)

    return qc
'''