def METHOD_NAME(input_prob):
    q = cirq.NamedQubit('q')
    gate = ccb.BayesianNetworkGate([('q', input_prob)], [])
    circuit = cirq.Circuit(gate.on(q))
    phi = (
        cirq.Simulator().simulate(circuit, qubit_order=[q], initial_state=0).state_vector(copy=True)
    )
    actual_probs = [abs(x) ** 2 for x in phi]
    np.testing.assert_almost_equal(actual_probs[1], input_prob, decimal=4)