code: def cirq_to_tk(circuit: cirq.Circuit) -> Circuit:
      
      qubit_list = _indexed_qubits_from_circuit(circuit)
      qid_to_num = {q : i for i, q in enumerate(qubit_list)}
      n_qubits = len(circuit.all_qubits())
      tkcirc = Circuit(n_qubits)
      for moment in circuit:
          for op in moment.operations:
              gate = op.gate
              gatetype = type(gate)
  
              qb_lst = [qid_to_num[q] for q in op.qubits]
  
              n_qubits = len(op.qubits)
  
              if gatetype == cirq_common.HPowGate and gate.exponent == 1:
                  gatetype = cirq_common.H
              elif gatetype == cirq_common.CNotPowGate and gate.exponent == 1:
                  gatetype = cirq_common.CNOT
  
              try:
                  optype = _cirq2ops_mapping[gatetype]
              except KeyError as error:
                  raise NotImplementedError("Operation not supported by tket: " + str(op.gate)) from error
              if isinstance(gate, _rotation_types):
                  o = tkcirc._get_op(optype,n_qubits,n_qubits,gate.exponent)
              elif isinstance(gate, cirq_common.MeasurementGate) :
                  o = tkcirc._get_op(optype,n_qubits,n_qubits,gate.key)
              else:
                  o = tkcirc._get_op(optype)
              tkcirc._add_operation(o,qb_lst)
      return tkcirc
docs: Converts a Cirq :py:class:`Circuit` to a :math:`\\mathrm{t|ket}\\rangle` :py:class:`Circuit` object.
      
         :param circuit: The input Cirq :py:class:`Circuit`
  
         :raises NotImplementedError: If the input contains a Cirq :py:class:`Circuit` operation which is not yet supported by pytket
  
         :return: The :math:`\\mathrm{t|ket}\\rangle` :py:class:`Circuit` corresponding to the input circuit