def hardware_ansatz_gate_stats(n_qubits: int, depth: int):
    """returns the gate statistics of the hardware ansatz"""
    # total gates =  depth*n_qubits^2/2+ 3*n_qubits*depth/4 + n_qubits

    gate_dict = {"n_qubits": n_qubits,
                 "gate_cx": depth*n_qubits*(n_qubits-1)//2,
                 "gate_ry": n_qubits*(depth+1),
                 "gate_rz": n_qubits*depth}
    gate_dict["gate_total"] = gate_dict["gate_cx"] + gate_dict["gate_ry"] + gate_dict["gate_rz"]
    return gate_dict