def METHOD_NAME(
    nlayers: int,
    two_qubit_gate_prob: float,
    connectivity_graph: nx.Graph,
    two_qubit_gate_name: str = "CNOT",
    seed: Optional[int] = None,
    return_type: Optional[str] = None,
) -> Tuple[QPROGRAM, Bitstring]:
    """
    Args:
        nlayers: The number of random Clifford layers to be generated.
        two_qubit_gate_prob: Probability of a two-qubit gate being applied.
        connectivity_graph: The connectivity graph of the backend
            on which the mirror circuit will be run. This is used
            to make sure 2-qubit gates are only applied to connected qubits.
        two_qubit_gate_name: Name of two-qubit gate to use. Options are "CNOT"
            and "CZ".
        seed: Seed for generating randomized mirror circuit.
        return_type: String which specifies the type of the
            returned circuit. See the keys of ``mitiq.SUPPORTED_PROGRAM_TYPES``
            for options. If ``None``, the returned circuit is a
            ``cirq.Circuit``.
    Returns:
        A randomized mirror circuit.
    """
    if not 0 <= two_qubit_gate_prob <= 1:
        raise ValueError("two_qubit_gate_prob must be between 0 and 1")
    supported_two_qubit_gates = {"CZ": cirq.CZ, "CNOT": cirq.CNOT}
    if two_qubit_gate_name not in supported_two_qubit_gates.keys():
        raise ValueError(
            f"Supported two-qubit gate names are "
            f"{tuple(supported_two_qubit_gates.keys())} but "
            f"{two_qubit_gate_name} was provided for `two_qubit_gate_name`."
        )
    two_qubit_gate = supported_two_qubit_gates[two_qubit_gate_name]
    random_state = random.RandomState(seed)
    single_qubit_cliffords = random_single_cliffords(
        connectivity_graph, random_state=random_state
    )
    forward_circuit = cirq.Circuit()
    quasi_inversion_circuit = cirq.Circuit()
    quasi_inverse_gates = []
    for _ in range(nlayers):
        forward_circuit.append(random_paulis(connectivity_graph, random_state))
        selected_edges = edge_grab(
            two_qubit_gate_prob, connectivity_graph, random_state
        )
        circ = random_cliffords(selected_edges, random_state, two_qubit_gate)
        forward_circuit.append(circ)
        quasi_inverse_gates.append(
            random_paulis(connectivity_graph, random_state)
        )
        quasi_inverse_gates.append(cirq.inverse(circ))
    quasi_inversion_circuit.append(
        gate for gate in reversed(quasi_inverse_gates)
    )
    rand_paulis = cirq.Circuit(random_paulis(connectivity_graph, random_state))
    circuit = (
        single_qubit_cliffords
        + forward_circuit
        + rand_paulis
        + quasi_inversion_circuit
        + cirq.inverse(single_qubit_cliffords)
    )
    # Compute the bitstring this circuit should sample.
    res = cirq.Simulator().run(
        circuit + cirq.measure(*sorted(circuit.all_qubits()))
    )
    bitstring = list(res.measurements.values())[0][0].tolist()
    return_type = "cirq" if not return_type else return_type
    return convert_from_mitiq(circuit, return_type), bitstring