qubiter.adv_applications.StairsAllDeriv_native module

class qubiter.adv_applications.StairsAllDeriv_native.StairsAllDeriv_native(gate_str_to_rads_list, file_prefix, parent_num_bits, hamil, **kwargs)[source]

Bases: qubiter.adv_applications.StairsDeriv_native.StairsDeriv_native

This class is a child of StairsDeriv_native. For the parent class, the get_mean_val() method returns a list of 4 partial derivatives belonging to a particular gate string (a gate_str is a key in gate_str_to_rads_list). For this class, get_mean_val() returns an ordered dictionary mapping each gate_str to its 4 partials.

Variables:deriv_gate_str (str) –
__init__(gate_str_to_rads_list, file_prefix, parent_num_bits, hamil, **kwargs)[source]

Constructor

Parameters:
  • gate_str_to_rads_list (dict[str, list[float|str]]) –
  • file_prefix (str) –
  • parent_num_bits (int) –
  • hamil (QubitOperator) –
  • kwargs (dict) – key-word arguments of MeanHamil
get_mean_val(var_num_to_rads)[source]

This method returns an ordered dictionary gate_str_to_partials_list mapping each gate_str to its 4 partial derivatives. This method calls the get_mean_val() of the parent class for all possible gate_str.

The output dictionary of this method can be converted to a numpy array using StairDerivCkt_writer.make_array_from_gate_str_to_rads_list()

Parameters:var_num_to_rads (dict[int, float]) –
Returns:
Return type:dict[str, list[float]]