code: def do_gate(self, gate: Gate) -> 'AbstractQuantumSimulator':
          
          unitary = lifted_gate(gate=gate, n_qubits=self.n_qubits)
          self.density = unitary.dot(self.density).dot(np.conj(unitary).T)
          return self
docs: Perform a gate.
  
          :return: ``self`` to support method chaining.