code: def copy(self, copy_backends=True, copy_default_backend=True,
               copy_cache=None, copy_history=None):
          
          copied = Circuit(self.n_qubits, self.ops.copy())
          if copy_backends:
              copied._backends = {k: v.copy() for k, v in self._backends.items()}
          if copy_default_backend:
              copied._default_backend = self._default_backend
  
          # Warn for deprecated options
          if copy_cache is not None:
              warnings.warn("copy_cache is deprecated. Use copy_backends instead.",
                            DeprecationWarning)
          if copy_history is not None:
              warnings.warn("copy_history is deprecated.", DeprecationWarning)
  
          return copied
docs: Copy the circuit.
  
          :params
          copy_backends :bool copy backends if True.
          copy_default_backend :bool copy default_backend if True.