'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    import math
    theta = 2*math.acos(math.sqrt(2/3))
    if theta < 0:
        theta = theta*-1
    qc.ry(theta,1)
    qc.x(1)
    qc.ch(1,0)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.x(0)
    qc.ch(0, 1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.H(0)
    qc.swap(0, 1)
    qc.H(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.H(0)
    qc.CX(0,1)
    qc.CX(1,0)
    qc.CX(0,1)
    qc.H(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.swap(0,1)
    qc.h(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.swap(0,1)
    qc.h(0)
    print(qc)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.x(1)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.CHgate(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.CHGate(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.ch(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.c(1, 0)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.x(0)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cz(0, 1)
    qc.p(a0.real, 0)
    qc.p(a1.real, 1)
    phi0, phi1, phi2 = [a0.imag, a1.imag, a2.imag]
    qc.ry(2*phi0, 0)
    qc.ry(2*phi1, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cz(0, 1)
    a0 = complex(np.random.rand(), np.random.rand())
    a1 = complex(np.random.rand(), np.random.rand())
    a2 = complex(np.random.rand(), np.random.rand())
    norm = np.sqrt(abs(a0)**2 + abs(a1)**2 + abs(a2)**2)
    a0 /= norm
    a1 /= norm
    a2 /= norm
    init_gate = Initialize([a0, a1, a2, 0])
    qc.append(init_gate, [0,1])
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(theta_a1, 1)
    qc.cx(1, 0)
    qc.cry(theta_a2, 1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    some_angle_1 = 2 * math.acos(1)
    qc.rx(some_angle_1, 0)
    some_angle_2 = 2 * math.acos(1)
    qc.rx(some_angle_2, 1)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0, 1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0, 1)
    qc.h(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)

    prob_amp = math.sqrt(1 / 3)
    rot_ang = 2 * math.acos(prob_amp)
    qc.cry(rot_ang, 0, 1)
    qc.cx(1, 0)

    prob_amp = math.sqrt(1 / 2)
    rot_ang = 2 * math.acos(prob_amp)
    qc.cry(rot_ang, 1, 0)

    qc.x(0)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(1.2310,0)
    qc.ry(0.785398,1)
    qc.x(0)
    qc.cx(0,1)
    qc.x(0)
    qc.ry(-0.785398,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.cx(0)
    qc.x(0)
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.cx(0, 1)
    qc.x(0)
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.cx(0, 1)
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.cx(0, 1)
    qc.ch(0, 1)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.cx(0, 1)
    qc.ch(0, 1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    a = 1/3

    qc.h(0)
    qc.h(1)

    qc.cx(0, 1)

    qc.rz(2*a, 1)

    qc.cx(0, 1)

    qc.h(0)
    qc.h(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    # 制御ユニタリゲート（CU1）を適用
    theta = 2 * math.acos(1/math.sqrt(3))  # 回転角度を計算
    qc.cu1(theta, 0, 1)  # 制御ビット：1番目のビット、ターゲットビット：2番目のビット

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    # 制御ユニタリゲート（CU1）を適用
    theta = 2 * math.acos(1/mat.sqrt(3))  # 回転角度を計算
    qc.CU1Gate(theta, 0, 1)  # 制御ビット：1番目のビット、ターゲットビット：2番目のビット

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    a0 = 0.6
    a1 = -0.4
    a2 = 0.8

    qc.ry(2 * math.asin(math.sqrt(a0)), 0)

    qc.ry(2 * math.asin(math.sqrt(a1)), 1)

    qc.ry(2 * math.asin(math.sqrt(a2)), 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    a0 = 0.6
    a1 = -0.4
    a2 = 0.8

    qc.ry(2 * math.asin(math.sqrt(a0)), 0)

    qc.ry(2 * math.asin(math.sqrt(a1)), 1)

    qc.ry(2 * math.asin(math.sqrt(a2)), 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.cx(0,1)
    qc.h(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(range(2))
    qc.u1(2 * 1.047, 0)  # 1.047は適当な位相（2π/3）
    qc.u1(4 * 1.047, 1)
# 回路作成して測定
qc =   circuit_bin4(theta0, theta1, theta2)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(range(2))
    qc.U1Gate(2 * 1.047, 0)  # 1.047は適当な位相（2π/3）
    qc.U1Gate(4 * 1.047, 1)
# 回路作成して測定
qc =   circuit_bin4(theta0, theta1, theta2)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(range(2))
    qc.p(2 * 1.047, 0)  # 1.047は適当な位相（2π/3）
    qc.p(4 * 1.047, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.x(0)  # Xゲートを量子ビット0に適用
    qc.h(0)  # アダマールゲートを量子ビット0に適用
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    # CNOTゲートを適用
    qc.x(0)
    qc.x(1)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import CU3Gate
def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)

    # 制御回転ゲートを使用して目的の状態 |ψ⟩ を作成
    a0 = 0.5  # 任意の係数 a0
    a1 = 0.3  # 任意の係数 a1
    a2 = 0.8  # 任意の係数 a2

    # 制御回転ゲートを使用して目的の状態 |ψ⟩ を作成
    qc.CU3Gate(2*a0, 0, 0, 0, 1)  # 制御ビット：量子ビット0、標的ビット：量子ビット1
    qc.CU3Gate(2*a1, 0, 0, 1, 0)  # 制御ビット：量子ビット1、標的ビット：量子ビット0
    qc.CU3Gate(2*a2, 0, 0, 1, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import CU3Gate
def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)

    # 制御回転ゲートを使用して目的の状態 |ψ⟩ を作成
    a0 = 0.5  # 任意の係数 a0
    a1 = 0.3  # 任意の係数 a1
    a2 = 0.8  # 任意の係数 a2

    # 制御回転ゲートを使用して目的の状態 |ψ⟩ を作成
    qc.CU3Gate(2*a0, 0, 0, 0)  # 制御ビット：量子ビット0、標的ビット：量子ビット1
    qc.CU3Gate(2*a1, 0, 0, 1)  # 制御ビット：量子ビット1、標的ビット：量子ビット0
    qc.CU3Gate(2*a2, 0, 0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ry(-math.pi / 4, 1)
    qc.cz(0, 1)
    qc.ry(math.pi / 4, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ry(-math.pi / 4, 1)
    qc.cz(0, 1)
    qc.ry(math.pi / 4, 1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(range(2))
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0) #|a> = 1/2^1/2(|00> + |10>)
    qc.ch(0,1) # |00> + |10> + |11>
    qc.cx(1,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

# from qiskit.quantum_info import Statevector

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(math.acos(1/math.sqrt(3))*2, 0)
    qc.ch(0, 1)
    qc.cx(1, 0)
    return qc

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


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(range(2))
    qc.z(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(range(2))
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(range(2))

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(range(2))
    qc.x(range(2))

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(range(2))
    qc.h(range(2))

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(range(2))
    qc.cz(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)
    qc.h(1)
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.z(1)
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(range(2))
    qc.z(1)
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(range(2))
    qc.z(1)
    qc.h(1)
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.x(1)
    qc.cx(1,0)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.x(0)
    qc.cx(0,1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.x(0)
    qc.ry(0.1,0)
    qc.cx(0,1)
    qc.ry(-0.1,0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def one2one(bit_org: int, bit: int, n_qubits: int) -> QuantumCircuit:
    qc = QuantumCircuit(n_qubits)
    b = 1
    bit_dif = bit_org ^ bit
    for i in range(n_qubits):
        if (bit_dif&b) > 0:
            qc.x(i)
        b *= 2
    return qc

def one2two(bit_org: int, bit1: int, bit2: int, n_qubits: int) -> QuantumCircuit:
    if bit1==bit2:
        return one2one(bit_org, bit1, n_qubits)
    qc = QuantumCircuit(n_qubits)
    bit1_dif = bit_org ^ bit1
    bit2_dif = bit_org ^ bit2
    dif_common = bit1_dif & bit2_dif
    dif_dif = bit1_dif ^ bit2_dif
    if dif_common == bit2_dif:
        bit1, bit2 = bit2, bit1
        bit1_dif, bit2_dif = bit2_dif, bit1_dif
    b = 1
    bit2_dif_last = -1
    for i in range(n_qubits):
        if (dif_common&b)>0:
            qc.x(i)
        if ((dif_dif&bit2_dif)&b)>0:
            bit2_dif_last = i
        b *= 2
    if (1<<bit2_dif_last)&bit_org > 0:
        qc.x(bit2_dif_last)
    qc.h(bit2_dif_last)
    if (1<<bit2_dif_last)&bit_org > 0:
        qc.x(bit2_dif_last)
    b = 1
    for i in range(n_qubits):
        if ((dif_dif&bit1_dif)&b)>0:
            qc.cx(bit2_dif_last, i)
        b *= 2
    qc.x(bit2_dif_last)
    b = 1
    for i in range(n_qubits):
        if ((dif_dif&bit2_dif)&b)>0 and i != bit2_dif_last:
            qc.cx(bit2_dif_last, i)
        b *= 2
    if (1<<bit2_dif_last)&bit_org > 0:
        qc.x(bit2_dif_last)
    return qc

def one2three(bit_org: int, bit1: int, bit2: int, bit3: int, n_qubits: int) -> QuantumCircuit:
    if bit1 == bit2 == bit3:
        return one2one(bit_org, bit1, n_qubits)

    qc = QuantumCircuit(n_qubits)
    b = 1
    for i in range(n_qubits):
        if (b&bit_org) > 0:
            qc.x(i)
        b *= 2

    b = 1
    for i in range(n_qubits):
        if not ((b&bit1) == (b&bit2) == (b&bit3)):
            if (b&bit1) == (b&bit2):
                bit1, bit3 = bit3, bit1
            elif (b&bit1) == (b&bit3):
                bit1, bit2 = bit2, bit1
            bit1ctrl = i
            bit1ctrlsgn = ((bit1&b) > 0)
            if bit1ctrlsgn:
                qc.ry(2*math.acos((2/3)**0.5), bit1ctrl)
            else:
                qc.ry(2*math.acos((1/3)**0.5), bit1ctrl)
            break
        b *= 2

    if not bit1ctrlsgn:
        qc.x(bit1ctrl)
    b = 1
    for i in range(n_qubits):
        if (b&bit1) > 0 and i != bit1ctrl:
            qc.cx(bit1ctrl, i)
        b *= 2
    if not bit1ctrlsgn:
        qc.x(bit1ctrl)

    if bit1ctrlsgn:
        qc.x(bit1ctrl)
    if bit2 == bit3:
        b = 1
        for i in range(n_qubits):
            if (bit2&b) > 0 and i != bit1ctrl:
                qc.cx(bit1ctrl, i)
            b *= 2
    else:
        b = 1
        for i in range(n_qubits):
            if (bit2&b) != (bit3&b) and i != bit1ctrl:
                qc.ch(bit1ctrl, i)
                if (bit2&b) == 0:
                    bit2, bit3 = bit3, bit2
                bit2ctrl = i
                break
            b *= 2
        b = 1
        for i in range(n_qubits):
            if (bit2&b) > 0 and i != bit2ctrl and i != bit1ctrl:
                qc.ccx(bit1ctrl, bit2ctrl, i)
            b *= 2
        qc.cx(bit1ctrl, bit2ctrl)
        b = 1
        for i in range(n_qubits):
            if (bit3&b) > 0 and i!=bit2ctrl and i != bit1ctrl:
                qc.ccx(bit1ctrl, bit2ctrl, i)
            b *= 2
        qc.cx(bit1ctrl, bit2ctrl)
    if bit1ctrlsgn:
        qc.x(bit1ctrl)
    return qc
def solve() -> QuantumCircuit:
    qc = one2three(0, 0, 1, 2, 2)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(1.231,0)
    qc.ry(3.14/4,1)
    qc.x(0)
    qc.cx(0,1)
    qc.x(0)
    qc.ry(-3.14/4,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(1.231,0)
    qc.ry(math.pi/4,1)
    qc.x(0)
    qc.cx(0,1)
    qc.x(0)
    qc.ry(-math.pi/4,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    theta = 0.15
    phi = 0.0
    λ = math.pi
    #qc.h(0)
    qc.u(theta, phi, λ,0)
    qc.u(theta, phi, λ,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from math

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


'''python
from qiskit import QuantumCircuit
from math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.u(2.9, 0, 0, 0)  # 0番目の量子ビットにU3ゲートを適用
    qc.u(1.46, 0, 0, 1)  # 1番目の量子ビットにU3ゲートを適用
    qc.cx(0,1)
    qc.u(-1.21, 0, 0, 1)
    qc.cx(1,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.u(2.03, 0, 0, 0)
    qc.u(1.46, 0, 0, 1)
    qc.cx(1,0)
    qc.u(-1.11, 0, 0, 0)
    qc.cx(1,0)
    qc.cx(1,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.x(0)
    qc.append(h_c, [0,1])
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from math
from qiskit.circuit.library.standard_gates import HGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    h_c = HGate().control(1)
    # Write your code here:
    qc.h(0)
    qc.x(0)
    qc.append(h_c, [0,1])
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from math
from qiskit.circuit.library.standard_gates import HGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    control_H = HGate().control(1)
    qc.h(0)
    qc.x(0)
    qc.append(control_H, [0,1])
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from math
from qiskit.circuit.library.standard_gates import HGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # Write your code here:
    control_H = HGate().control(1)
    qc.h(0)
    qc.x(0)
    qc.append(control_H, [0,1])
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math
from qiskit.circuit.library.standard_gates import HGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # Write your code here:
    control_H = HGate().control(1)
    qc.h(0)
    qc.x(0)
    qc.append(control_H, [0,1])
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library.standard_gates import HGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # Write your code here:
    control_H = HGate().control(1)
    qc.h(0)
    qc.x(0)
    qc.append(control_H, [0,1])
    qc.x(0)
    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # Write your code here:
    control_H = HGate().control(1)
    qc.h(0)
    qc.x(0)
    qc.append(control_H, [0,1])
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    with qc.if_test((0, 0)):
        qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.h(0)
    qc.ch(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(1)
    qc.x(1)
    qc.ch(1, 0)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(math.pi/3,0)
    qc.x(0)
    qc.ch(0,1)
    qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(math.pi/3,0)
    qc.x(0)
    qc.ch(0,1)
    qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import mat

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


'''python
from qiskit import QuantumCircuit
import math

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(0, 1)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)
    # Write your code here:

    return qc
'''


'''python
#%%
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.cz(0,1)
    qc.s(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)

    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.rx(0, 2 * pi/3)
    qc.ch(0, 1)
    qc.x(0)

    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.rx(2 * pi/3, 0)
    qc.ch(0, 1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)

    prob_amp = math.sqrt(1 / 3)
    rot_ang = 2 * math.acos(prob_amp)
    qc.cry(rot_ang, 0, 1)
    qc.cx(1, 0)

    prob_amp = math.sqrt(1 / 2)
    rot_ang = 2 * math.acos(prob_amp)
    qc.cry(rot_ang, 1, 0)

    qc.x(0)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    # Toffoliゲートを適用（00、01、10の状態には影響なし、11の状態だけで補助ビットを反転）
    qc.ccx(0, 1, 2)

    # 必要に応じて補助ビットに対して追加の操作を行う
    # 例: 補助ビットにZゲートを適用
    qc.cx(2,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.ch(0,1)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.x(0)
    qc.x(1)
    qc.ch(1, 0)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit
from math import pi, sqrt
import numpy as np

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Define the coefficients
    a0 = 1/sqrt(3)
    a1 = 1/sqrt(3)
    a2 = 1/sqrt(3)

    # Normalize the coefficients (if they aren't normalized already)
    norm = sqrt(abs(a0)**2 + abs(a1)**2 + abs(a2)**2)
    a0 /= norm
    a1 /= norm
    a2 /= norm

    # Create a quantum circuit with 2 qubits
    qc = QuantumCircuit(2)

    # Step 1: Apply a rotation on qubit 0 to create the superposition for a0 and the sum of a1 + a2
    theta_1 = 2 * np.arccos(a0)
    qc.ry(theta_1, 0)

    # Step 2: Apply a controlled rotation on qubit 1 based on qubit 0 to differentiate between a1 and a2
    theta_2 = 2 * np.arccos(a2 / sqrt(a1**2 + a2**2))
    qc.cry(theta_2, 0, 1)

    # Step 3: Apply an X gate on qubit 0 to swap the states for a1 and a2
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    theta1 = 2 * np.arccos(1/np.sqrt(3))
    theta2 = (np.pi/4)

    qc.ry(theta=theta1, qubit=0)
    qc.ry(theta=theta2, qubit=1)
    qc.cx(control_qubit=0, target_qubit=1)
    qc.ry(theta=-theta2, qubit=1)
    qc.x(qubit=0)

    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    theta1 = 2 * np.arccos(1/np.sqrt(3))
    theta2 = (np.pi/4)

    qc.ry(theta=theta1, qubit=0)
    qc.ry(theta=theta2, qubit=1)
    qc.cx(control_qubit=0, target_qubit=1)
    qc.ry(theta=-theta2, qubit=1)
    qc.x(qubit=0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.ch(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.x(1)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.x(1)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library.standard_gates import HGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.append(HGate().control(0), [1])
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library.standard_gates import HGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.H(1).control(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.H(1).control(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(1,0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
def solve() -> QuantumCircuit:
    x, y = QuantumRegister(1), QuantumRegister(1)
    qc = QuantumCircuit(x, y)
    # Write your code here:
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
	qc = QuantumCircuit(2)
	qc.swap(0, 1)
	qc.h(0)
	qc.h(1)
	qc.ch(1, 0)
	return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.cx(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.ch(0, 1)
    qc.ch(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.ch(0, 1)
    qc.crh(pi, 1, 0)

    return qc
'''


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

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

    qc.h(0)
    qc.ch(0, 1)
    qc.crh(-pi/2,1, 0)

    return qc
'''


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

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

    qc.h(0)
    qc.ch(0, 1)
    qc.ch(1, 0)

    return qc
'''


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

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

    qc.h(0)
    qc.cx(0, 1)
    qc.ch(1, 0)

    return qc
'''


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

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

    qc.h(0)
    qc.cx(0, 1)
    qc.cx(1, 0)

    return qc
'''


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

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

    qc.h(0)
    qc.h(1)
    qc.ch(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.cx(0, 1)
    qc.h(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.cx(0, 1)
    qc.h(1)
    qc.cx(1, 2)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.h(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.h(1)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(2*math.acos(math.sqrt(2/3)),1)

    qc.x(1)

    qc.ch(1,0)

    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(2*math.acos(math.sqrt(2/3)),1)

    qc.x(1)

    qc.ch(1,0)

    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.ch(0,1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    qc.h(1)

    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(1)
    qc.cx(1,0)

    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(1)
    qc.x(1)
    qc.cx(1,0)

    qc.x(1)

    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(1)
    qc.x(1)
    qc.ch(1,0)

    qc.x(1)

    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    # a_0, a_1, a_2 の値に基づいて計算する必要がある
    a_0 = 1 / sqrt(3)
    a_1 = 1 / sqrt(3)
    a_2 = 1 / sqrt(3)

    # 角度 theta と phi を計算（ここでは例として設定しますが、a_0, a_1, a_2 に基づいて計算する必要があります）
    theta = 2 * acos(sqrt(a_0**2 + a_2**2))
    phi = 2 * acos(a_0 / sqrt(a_0**2 + a_2**2))

    # 1番目の量子ビットにRYゲートを適用
    qc.ry(theta, 0)

    # 1番目の量子ビットを制御量子ビットとして、2番目の量子ビットにCNOTゲートを適用
    qc.cx(0, 1)

    # 2番目の量子ビットにRYゲートを適用
    qc.ry(phi, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(0,1)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cy(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.x(0)
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)
    qc.h(0)
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)
    qc.h(0)
    qc.cx(1)
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.y(0)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cry(pi/2, 1, 0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(1)
    qc.cry(pi/2, 1, 0)
    qc.cx(0, 1)

    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(1)
    qc.cry(pi/2, 1, 0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    theta = math.asin(1.0 / math.sqrt(3.0))
    qc.ry(2.0 * theta, 0)
    qc.x(0)
    qc.ch(0, 1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.ch(1, 0)
    qc.cx(0,)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.ch(1, 0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.assign_parameters(a0,a1,a2,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.assign_parameters(,,,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(arccos(sqrt(2.0/3.0))*2.0, 0)
    qc.x(0)
    qc.ch(0, 1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(math.arccos(math.sqrt(2.0/3.0))*2.0, 0)
    qc.x(0)
    qc.ch(0, 1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(math.arccos(math.sqrt(2.0/3.0))*2.0, 0)
    qc.x(0)
    qc.ch(0, 1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(math.acos(math.sqrt(2.0/3.0))*2.0, 0)
    qc.x(0)
    qc.ch(0, 1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.ch(1,0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.h(1)
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.cz(0,1)
    qc.ch(0,1)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(1,0)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(0,1)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(1,0)
    qc.cx(0,1)

    return qc

print(solve())
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(1,0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(1)
    qc.ch(1,0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.y(1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
qc.h(1)
qc.rz(pi/3, 0)  # 量子ビット0に位相を加える
qc.rz(pi/2, 1)  # 量子ビット1に位相を加える
    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(0,1)

    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,0)
    qc.cx(0,1)

    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    t = 2 * math.asin(math.sqrt(3)/3)
    qc.ry(t, 0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    t = 2 * math.asin(math.sqrt(3)/3)
    qc.ry(t, 0)
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    t = 2 * math.asin(math.sqrt(3)/3)
    qc.ry(t, 0)
    qc.ch(0, 1)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    t = 2 * math.asin(math.sqrt(3)/3)
    qc.ry(t, 0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    # Define amplitudes a0, a1, a2; a3 = 0
    norm = math.sqrt(3)
    state = [1/norm, 1/norm, 1/norm, 0]  # [|00>, |01>, |10>, |11>]
    qc.initialize(state, [0, 1])
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0,1)
    qc.ch(0,1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0) # |00>, |01>
    qc.ch(0,1) # |00>, |01>, |11>
    qc.x(0) # |01>, |00>, |10>
    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.append(SwapGate().power(1/2), [0, 1])
    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(1, 0)
    qc.ry(math.pi / 2, 1)
    qc.rz(math.pi / 16, 1)
    qc.cx(0, 1)
    qc.rz(math.pi / 8, 0)
    qc.rz(-math.pi / 8, 1)
    qc.cx(0, 1)
    qc.rz(math.pi / 16, 1)
    qc.ry(-math.pi / 2, 1)
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(1, 0)
    qc.ry(math.pi / 2, 1)
    qc.rz(math.pi / 16, 1)
    qc.cx(0, 1)
    qc.rz(math.pi / 8, 0)
    qc.rz(-math.pi / 8, 1)
    qc.cx(0, 1)
    qc.rz(math.pi / 16, 1)
    qc.ry(-math.pi / 2, 1)
    qc.cx(1, 0)
    return qc
'''


'''python
import math
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(1, 0)
    qc.ry(math.pi / 2, 1)
    qc.rz(math.pi / 16, 1)
    qc.cx(0, 1)
    qc.rz(math.pi / 8, 0)
    qc.rz(-math.pi / 8, 1)
    qc.cx(0, 1)
    qc.rz(math.pi / 16, 1)
    qc.ry(-math.pi / 2, 1)
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(0, 1)
    qc.cry(3, 0, 1)
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(1)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(1)
    qc.h(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)
    qc.h(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(1,0)
    qc.cx(1,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(1)
    qc.h(0)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.cx(0,0)
    qc.cx(1,0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(1)
    qc.h(0)
    qc.cx(0,1)
    qc.reset()

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.cx(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(1)
    qc.cx(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(1)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(1)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(1)
    qc.cU(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(1)
    qc.cU(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(1)
    qc.h(0)
    qc.cx(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(1)
    qc.h(0)
    qc.cx(1,0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(1,0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(0)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)
    qc.h(1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(1)
    qc.h(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(1)
    qc.h(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(1)
    qc.cx(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(1)
    qc.cswap(1,0,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(1)
    qc.cswap(0,1,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    a0, a1, a2 = 1, 1, 1
    qc.initialize([a0, a1, a2, 0], [0, 1])

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.x(0)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # 任意の複素振幅を指定
    a0 = 0.5  # 例として0.5を指定
    a1 = 0.3  # 例として0.3を指定
    a2 = 0.7  # 例として0.7を指定

    # 初期状態を作成
    qc.h(0)  # アダマールゲートを使用して0番目の量子ビットに均等な重ね合わせを作成
    qc.cx(0, 1)  # CNOTゲートを使用して0番目の量子ビットの情報を1番目の量子ビットにコピー

    # それぞれの振幅を適用
    qc.u3(2*a0.real, 2*a0.imag, 0, 0)  # 0番目の量子ビットに対する振幅
    qc.u3(2*a1.real, 2*a1.imag, 0, 1)  # 1番目の量子ビットに対する振幅

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(2*math.acos(sqrt(1/3)), 0)
    qc.cry(math.pi/2, 0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(2*math.acos(math.sqrt(1/3)), 0)
    qc.cry(math.pi/2, 0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.ry(2*math.acos(math.sqrt(1/3)), 0)
    qc.cry(math.pi/2, 0, 1)
    qc.x(0)

    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    matrix = [
               [1, 0, 0, 0],
               [0, 0, 1, 0],
               [0, 1, 0, 0],
               [0, 0, 0, 1]
            ]
    gate = UnitaryGate(matrix)
    qc.append(gate, [0,1])

    return qc
'''


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

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

    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    state = (np.sqrt(3) ** -1) * np.array([1,1,1,0])
    qc.initialize(state)
    qc = qc.decompose().decompose().decompose().decompose().decompose().decompose()
    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.h(1)
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.h(1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.prepare_state([(3 ** 0.5) / 3, (3 ** 0.5) / 3, (3 ** 0.5) / 3, 0], qc.qubits)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(1)
    qc.ch(1,0)
    qc.cx(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    init = [1/math.sqrt(3), 1/math.sqrt(3), 1/math.sqrt(3), 0]
    qc.initialize(init, [0, 1])

    return qc
'''


'''python
from qiskit import QuantumCircuit
from qiskit.quantum_info.operators import Operator
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    operator = Operator([
        [1/math.sqrt(3), 0, 0, 0],
        [1/math.sqrt(3), 0, 0, 0],
        [1/math.sqrt(3), 0, 0, 0],
        [1/math.sqrt(3), 0, 0, 0]
    ])
    qc.unitary(operator, [0, 1])

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.t(0)
    qc.h(0)
    qc.cx(0, 1)
    qc.h(1)
    qc.t(1)
    qc.h(1)
    qc.x(0)
    qc.h(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    lis = []
    k = 3
    tmp = 0
    while(k>0):
        if k%2:
            lis = lis + [tmp]
        tmp += 1
        k = k //2
    m = 2 ** (lis[0])

    for i in range(1,len(lis)):
        qc.x(lis[i])
    if lis[0] > 0:
        for i in range(lis[0]):
            qc.h(i)
    qc.ry(-2*math.acos(math.sqrt(m / 3)), lis[1])
    qc.x(lis[1])
    for i in range(lis[0],lis[1]):
        qc.ch(lis[1], i)
    qc.x(lis[1])
    for i in range(1,len(lis) - 1):
        qc.x(lis[i])
        qc.cry(-2 * math.acos(math.sqrt(2 ** lis[i] / (3 - m))), lis[i], lis[i+1])
        qc.x(lis[i])
        qc.x(lis[i+1])
        for j in range(lis[i],lis[i+1]):
            qc.ch(lis[i+1],j)
        qc.x(lis[i+1])
        m = m + 2 ** (lis[i])
    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.x(0)
    qc.u(math.pi*253/416,math.pi, math.pi,0)
    qc.x(0)
    qc.ch(0,1)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

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

    qc.x(0)
    qc.u(math.pi*253/416,math.pi, math.pi,0)
    qc.x(0)
    qc.ch(0,1)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0,1)
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(1)

    qc.cz(0, 1)

    qc.h(0)
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h([0, 1])

    qc.cx(0, 1)

    qc.h([0, 1])

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # 任意の複素振幅 a0, a1, a2 を使用
    a0 = 0.6
    a1 = 0.8
    a2 = 0.3

    # アダマールゲートを各量子ビットに適用
    qc.h(0)
    qc.h(1)

    # U3ゲートを使用して任意の複素振幅を設定
    qc.u3(2 * a0.real, 2 * a0.imag, 0, 0)  # U3ゲートを使用して振幅a0を適用
    qc.u3(2 * a1.real, 2 * a1.imag, 0, 1)  # U3ゲートを使用して振幅a1を適用
    qc.u3(2 * a2.real, 2 * a2.imag, 1, 0)  # U3ゲートを使用して振幅a2を適用

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.cx(1,0)
    qc.ch(0,1)
    qc.cx(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit, QuantumRegister
from qiskit.circuit.library import HGate, CXGate, MCPhaseGate
import math

def solve() -> QuantumCircuit:
    qr = QuantumRegister(2)
    qc = QuantumCircuit(qr)

    # 最初の量子ビットにアダマールゲートを適用して重ね合わせを作成
    h_gate = HGate()
    qc.append(h_gate, [qr[0]])

    # 適当な位相を追加して振幅を変更（例として）
    angle_a1 = math.pi / 4  # a1 の位相
    angle_a2 = math.pi / 3  # a2 の位相

    # 量子ビット0が|1⟩の場合に量子ビット1に位相を追加
    mcphase_gate_a1 = MCPhaseGate(angle_a1, 1)
    qc.append(mcphase_gate_a1, [qr[0], qr[1]])

    # CNOTゲートを適用してもつれを作成
    cx_gate = CXGate()
    qc.append(cx_gate, [qr[0], qr[1]])

    # 量子ビット0が|0⟩の場合に量子ビット1に別の位相を追加
    mcphase_gate_a2 = MCPhaseGate(angle_a2, 1)
    qc.append(mcphase_gate_a2, [qr[0], qr[1]])

    return qc

# # 回路を表示
# qc = solve()
# print(qc)
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
from qiskit.circuit.library import HGate, CXGate, RYGate, CU3Gate

def solve() -> QuantumCircuit:
    # 量子レジスタを作成
    qr = QuantumRegister(2)
    qc = QuantumCircuit(qr)

    # 回転角度を設定（これらは具体的な振幅に基づいて調整する必要があります）
    theta_0 = 0  # RYの回転角度
    theta_1, phi_1, lam_1 = 0, 0, 0  # 初めのCU3のパラメータ
    theta_2, phi_2, lam_2 = 0, 0, 0  # 2つ目のCU3のパラメータ

    # 回転ゲートを適用
    qc.append(RYGate(theta_0), [qr[0]])

    # 制御U3ゲートを適用
    qc.append(CU3Gate(theta_1, phi_1, lam_1), [qr[1], qr[0]])

    # CNOTゲートを適用
    qc.append(CXGate(), [qr[1], qr[0]])

    # さらに別の制御U3ゲートを適用
    qc.append(CU3Gate(theta_2, phi_2, lam_2), [qr[1], qr[0]])

    return qc

# 回路を表示
# qc = solve()
# print(qc)
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import HGate, CXGate

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # 1つ目の量子ビットにアダマールゲートを適用
    qc.append(HGate(), [0])

    # 任意の条件付き操作（例：制御NOTゲート）
    qc.append(CXGate(), [0, 1])

    # 他の必要な操作を追加

    return qc

# print(solve())
'''


'''python
from qiskit import QuantumCircuit
from qiskit.circuit.library import HGate, RYGate
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # アダマールゲートを適用して重ね合わせ状態を作成
    qc.append(HGate(), [0])

    # RY ゲートを使用して振幅を調整
    angle = 2 * math.acos(1 / math.sqrt(3))
    qc.append(RYGate(angle), [1])

    # 制御NOTゲートを適用
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit
from math import sqrt, acos

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # theta0 と theta1 を計算
    theta0 = 2 * acos(1 / sqrt(3))
    theta1 = 2 * acos(1 / sqrt(2))

    # 最初の量子ビットに RY ゲートを適用
    qc.ry(theta0, 0)

    # 2番目の量子ビットに条件付き RY ゲートを適用
    qc.cry(theta1, 0, 1)

    # 最後に、2番目の量子ビットにアダマールゲートを適用
    qc.h(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h([0, 1])
    qc.cx(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(range(0, 2))
    qc.ch(0, 1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(range(2))
    qc.ch(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    if qc.measure(0) == qc.measure(1)==1:
        qc.xc(0,1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    state = np.array([1, 1, 1, 0])
    qc.initialize(state)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    state = [1, 1, 1, 0]
    qc.initialize(state)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(3)
    qc.h(0)
    qc.h(1)
    qc.ccx(0, 1, 2)
    qc.reset(2)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.h(1)
    qc.t(1)
    qc.cx(0, 1)
    qc.tdg(1)
    qc.cx(0, 1)
    qc.t(0)
    qc.h(0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc

print(solve())
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.prepare_state([1/math.sqrt(3), 1/math.sqrt(3), 1/math.sqrt(3), 0], qc.qubits)

    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.initialize([1/math.sqrt(3), 1/math.sqrt(3), 1/math.sqrt(3), 0], qc.qubits)

    return qc

print(solve())
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)

    return qc

print(solve())
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(1)
    qc.cx(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(1, 0)
    qc.cx(0, 1)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.ch(0, 1)
    qc.cx(1, 0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    qc.ch(0,1)
    qc.cx(1,0)
    # Write your code here:

    return qc
'''


'''python
from qiskit import QuantumCircuit, QuantumRegister
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    theta = math.asin(1.0/math.sqrt(3.0))
    qc.ry(2.0 * theta,0)
    qc.x(0)
    qc.ch(0,1)
    qc.x(0)
    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    qc.h(0)
    qc.h(1)
    qc.z(1)
    qc.x(1)

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    a0 = 1/sqrt(3)
    a1 = 1/sqrt(3)
    a2 = 1/sqrt(3)
    # The state is defined as:
    #   |ψ⟩ = a0|00⟩ + a1|10⟩ + a2|01⟩.
    #
    # Qiskit's initialize expects a state vector in the order:
    #   |00⟩, |01⟩, |10⟩, |11⟩.
    # Thus we set:
    #   amplitude for |00⟩ is a0,
    #   amplitude for |01⟩ is a2,
    #   amplitude for |10⟩ is a1,
    #   amplitude for |11⟩ is 0.
    state = [a0, a2, a1, 0]

    # Use the initialize instruction to prepare the state from |00>.
    qc.initialize(state, [0, 1])

    return qc
'''


'''python
from qiskit import QuantumCircuit

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

    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    state = [1/np.sqrt(3)]*3+[0]
    qc.initialize(state, [0, 1])
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    state = [1/np.sqrt(3)]*3
    state.extend([0])
    qc.initialize(state, [0, 1])
    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    state_vector = [1/np.sqrt(3),1/np.sqrt(3), 1/np.sqrt(3),0]

    state = Statevector(state_vector)
    qc.initialize(state, [0, 1])
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    state_vector = [1/math.sqrt(3),1/math.sqrt(3), 1/math.sqrt(3),0]

    qc.initialize(state_vector, [0, 1])
    return qc
'''


'''python
from qiskit import QuantumCircuit
import math

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    state_vector = [1/math.sqrt(3),1/math.sqrt(3), 1/math.sqrt(3)]

    qc.initialize(state_vector, [0, 1])
    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    state_vector = np.zeros(4)
    for i in range(3):
        state_vector[i]=1/np.sqrt(3)

    qc.initialize(state_vector, [0, 1])
    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    state_vector = np.zeros(4)
    for i in range(4):
        if i==1:
            continue
        state_vector[i]=1/np.sqrt(3)

    qc.initialize(state_vector, [0, 1])
    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    state_vector = np.zeros(4)
    for i in range(3):
        state_vector[i]=1/np.sqrt(3)
    state=Statevector(state_vector)
    qc.initialize(state, [0, 1])
    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    for i in range(3):
        qc.h(i)
    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    for i in range(3):
        qc.h(i)
    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
    state_list = [1/np.sqrt(3), 1/np.sqrt(3), 1/np.sqrt(3), 0]
    qc.initialize(state_list, [0,1])
    return qc
'''


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

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

    qc.u(pi/4, 0, 0, 0)
    qc.u(1.23, 0, 0, 1)

    qc.cx(0, 1)

    qc.u(pi/4, 0, 0, 0)
    qc.cx(0, 1)

    return qc
'''


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

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

    qc.u(pi/4, 0, 0, 0)
    qc.u(1.23, 0, 0, 1)

    qc.cx(1, 0)

    qc.u(pi/4, 0, 0, 0)
    qc.cx(1, 0)

    return qc
'''


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

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

    qc.u(np.pi/4, 0, 0, 0)
    qc.u(1.23, 0, 0, 1)

    qc.cx(1, 0)

    qc.u(np.pi/4, 0, 0, 0)
    qc.cx(1, 0)

    return qc
'''


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

def solve() -> QuantumCircuit:
    # 複素振幅（任意の非ゼロ値）
    a0 = 1 + 0j
    a1 = 1j
    a2 = -1
    a3 = 0  # |11⟩には振幅なし（必須）

    # 正規化（∑|a_i|^2 = 1 になるように）
    norm = np.sqrt(abs(a0)**2 + abs(a1)**2 + abs(a2)**2)
    state = [a0 / norm, a2 / norm, a1 / norm, a3]  # Qiskitの順番は: |00⟩, |01⟩, |10⟩, |11⟩

    qc = QuantumCircuit(2)
    qc.initialize(state, [0, 1])
    return qc
'''


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

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)

    # 任意の複素振幅（a0, a1, a2）を作るための例：ここでは簡易に実数比を使う
    a0 = 1.0
    a1 = 1.0
    a2 = 1.0

    # 正規化
    norm = np.sqrt(a0**2 + a1**2 + a2**2)
    a0 /= norm
    a1 /= norm
    a2 /= norm

    # θ1: q0 の回転 → a0, a1 成分を作る
    theta1 = 2 * np.arccos(a0 / np.sqrt(a0**2 + a1**2))
    qc.u3(theta1, 0, 0, 0)

    # CNOTで q0=0 のとき q1 に状態を分配するために条件反転
    qc.x(0)

    # θ2: q1 の回転 → a2 成分を q0=0 の条件下で注入
    theta2 = 2 * np.arcsin(a2)
    qc.cx(0, 1)
    qc.u3(theta2, 0, 0, 1)
    qc.cx(0, 1)

    # q0 戻す
    qc.x(0)

    return qc
'''


'''python
from qiskit import QuantumCircuit

def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.ch(0,1)
    qc.cx(1,0)
    return qc
'''