original_docstring: Define a Trotter splitting for non-commuting Pauli in ProjectQ
  
      This routine defines a first-order Trotter splitting to be applied to
      time evolution operators in ProjectQ.
  
      Args:
          cmd(projectq.command): A command from ProjectQ that needs to be
              factorized due to non-commuting terms
      
docstring: Define a Trotter splitting for non-commuting Pauli in ProjectQ
  This routine defines a first-order Trotter splitting to be applied to
  time evolution operators in ProjectQ.
docstring_tokens: Define a Trotter splitting for non - commuting Pauli in ProjectQ This routine defines a first - order Trotter splitting to be applied to time evolution operators in ProjectQ .
code: def _first_order_trotter(cmd):
      """Define a Trotter splitting for non-commuting Pauli in ProjectQ
  
      This routine defines a first-order Trotter splitting to be applied to
      time evolution operators in ProjectQ.
  
      Args:
          cmd(projectq.command): A command from ProjectQ that needs to be
              factorized due to non-commuting terms
      """
      qureg = cmd.qubits
      eng = cmd.engine
      hamiltonian = cmd.gate.hamiltonian
      time = cmd.gate.time
      with projectq.meta.Control(eng, cmd.control_qubits):
          # First order Trotter splitting
              for term in hamiltonian.terms:
                  ind_operator = projectq.\
                      ops.QubitOperator(term, hamiltonian.terms[term])
                  projectq.ops.TimeEvolution(time, ind_operator) | qureg
code_tokens: def _first_order_trotter ( cmd ) : qureg = cmd . qubits eng = cmd . engine hamiltonian = cmd . gate . hamiltonian time = cmd . gate . time with projectq . meta . Control ( eng , cmd . control_qubits ) : for term in hamiltonian . terms : ind_operator = projectq . ops . QubitOperator ( term , hamiltonian . terms [ term ] ) projectq . ops . TimeEvolution ( time , ind_operator ) | qureg
short_docstring: Define a Trotter splitting for non-commuting Pauli in ProjectQ
  This routine defines a first-order Trotter splitting to be applied to
  time evolution operators in ProjectQ.
short_docstring_tokens: Define a Trotter splitting for non - commuting Pauli in ProjectQ This routine defines a first - order Trotter splitting to be applied to time evolution operators in ProjectQ .
comment: """Define a Trotter splitting for non-commuting Pauli in ProjectQ
  
      This routine defines a first-order Trotter splitting to be applied to
      time evolution operators in ProjectQ.
  
      Args:
          cmd(projectq.command): A command from ProjectQ that needs to be
              factorized due to non-commuting terms
      """$SEP$# First order Trotter splitting