original_docstring: Save all attributes of QVFitter object.
docstring: Save all attributes of QVFitter object.
docstring_tokens: Save all attributes of QVFitter object .
code: def gate_counts(qv_circs) -> dict:
      """Save all attributes of QVFitter object."""
      
      gcounts = {'u1': [], 'u2':[], 'u3':[], 'cx': [], 'cz':[]}
      for qc in qv_circs:
          try: 
              count_dict = qc.count_ops()
          except AttributeError:
              count_dict = QuantumCircuit.from_qasm_str(qc).count_ops()
          [
              gcounts[key].append(count_dict[key]) 
              for key in gcounts if key in count_dict
          ]
      return gcounts
code_tokens: def gate_counts ( qv_circs ) -> dict : gcounts = { 'u1' : [ ] , 'u2' : [ ] , 'u3' : [ ] , 'cx' : [ ] , 'cz' : [ ] } for qc in qv_circs : try : count_dict = qc . count_ops ( ) except AttributeError : count_dict = QuantumCircuit . from_qasm_str ( qc ) . count_ops ( ) [ gcounts [ key ] . append ( count_dict [ key ] ) for key in gcounts if key in count_dict ] return gcounts
short_docstring: Save all attributes of QVFitter object.
short_docstring_tokens: Save all attributes of QVFitter object .
comment: """Save all attributes of QVFitter object."""