code: def do_gate(self, gate: Gate):
          
          gate_matrix, qubit_inds = _get_gate_tensor_and_qubits(gate=gate)
          # Note to developers: you can use either einsum- or tensordot- based functions.
          # tensordot seems a little faster, but feel free to experiment.
          # self.wf = targeted_einsum(gate=gate_matrix, wf=self.wf, wf_target_inds=qubit_inds)
          self.wf = targeted_tensordot(gate=gate_matrix, wf=self.wf, wf_target_inds=qubit_inds)
          return self
docs: Perform a gate.
  
          :return: ``self`` to support method chaining.