def METHOD_NAME(cv: List[int]):
    gate = cirq_ft.And(cv)
    r = gate.registers
    assert r['ancilla'].total_bits() == r['control'].total_bits() - 2
    quregs = r.get_named_qubits()
    and_op = gate.on_registers(**quregs)
    circuit = cirq.Circuit(and_op)
    input_controls = [cv] + [random_cv(len(cv)) for _ in range(10)]
    qubit_order = gate.registers.merge_qubits(**quregs)
    for input_control in input_controls:
        initial_state = input_control + [0] * (r['ancilla'].total_bits() + 1)
        result = cirq.Simulator(dtype=np.complex128).simulate(
            circuit, initial_state=initial_state, qubit_order=qubit_order
        )
        expected_output = np.asarray([0, 1] if input_control == cv else [1, 0])
        assert cirq.equal_up_to_global_phase(
            cirq.sub_state_vector(
                result.final_state_vector, keep_indices=[cirq.num_qubits(gate) - 1]
            ),
            expected_output,
        )
        # Test adjoint.
        cirq_ft.testing.assert_circuit_inp_out_cirqsim(
            circuit + cirq.Circuit(cirq.inverse(and_op)),
            qubit_order=qubit_order,
            inputs=initial_state,
            outputs=initial_state,
        )