qubiter.adv_applications.StairsDeriv module

class qubiter.adv_applications.StairsDeriv.StairsDeriv(deriv_gate_str, gate_str_to_rads_list, file_prefix, parent_num_qbits, hamil, **kwargs)[source]

Bases: qubiter.adv_applications.MeanHamil.MeanHamil

This abstract class is a child of abstract class MeanHamil. The main purpose of its children classes is to override the method get_mean_val() of its parent class MeanHamil. The override returns the partial derivatives of a quantum cost function defined from a stairs circuit (an object of of class StairsCkt.writer) and a hamil (an object of the Openfermion class QubitOperator).

  • dpart_dict (dict[int, list[str]]) –
  • deriv_gate_str (str) –
  • gate_str_to_rads_list (dict[str, list[float|str]]) –
__init__(deriv_gate_str, gate_str_to_rads_list, file_prefix, parent_num_qbits, hamil, **kwargs)[source]


  • deriv_gate_str (str) –
  • gate_str_to_rads_list (dict[str, list[float|str]]) –
  • file_prefix (str) –
  • parent_num_qbits (int) –
  • hamil (QubitOperator) –
  • kwargs (dict) – key-word arguments of MeanHamil
dpart_dict = {0: ['single'], 1: ['1', 's', '1s'], 2: ['1', 's', '1s'], 3: ['1', 's', '1s']}

Abstract method. The main goal of subclasses of this class is to override this method.

Parameters:var_num_to_rads (dict[int, float]) –