quara.protocol.qtomography.standard.standard_qst module¶
- class StandardQst(povms, is_physicality_required=False, is_estimation_object=False, on_para_eq_constraint=False, eps_proj_physical=None, seed=None, schedules='all')[source]¶
Bases:
quara.protocol.qtomography.standard.standard_qtomography.StandardQTomographyConstructor
- Parameters
povms (List[Povm]) – testers of QST.
is_physicality_required (bool, optional) – whether the QOperation is physically required, by default False
is_estimation_object (bool, optional) – whether the QOperation is estimation object, by default False
on_para_eq_constraint (bool, optional) – whether the parameters of QOperation are on equal constraint, by default False
eps_proj_physical (float, optional) – threshold epsilon where the algorithm repeats the projection in order to make estimate object is physical, by default
get_atol()/ 10.0seed (int, optional) – a seed used to generate random data, by default None.
schedules (Union[str, List[List[Tuple]]]) –
- Raises
ValueError – the experiment is not valid.
- convert_var_to_qoperation(var)[source]¶
converts variable to QOperation.
see
convert_var_to_qoperation()- Parameters
var (numpy.ndarray) –
- Return type
- generate_dataset(data_nums)[source]¶
calculates a probability distribution.
- Parameters
data_nums (List[int]) –
- Return type
List[List[numpy.ndarray]]
- generate_empi_dist(schedule_index, state, num_sum)[source]¶
Generate empirical distribution using the data generated from probability distribution of specified schedules.
- Parameters
schedule_index (int) – schedule index.
state (State) – true object.
num_sum (int) – the number of data to use to generate the experience distributions for each schedule.
- Returns
Generated empirical distribution.
- Return type
Tuple[int, np.ndarray]
- generate_empi_dists(state, num_sum)[source]¶
Generate empirical distributions using the data generated from probability distributions of all schedules.
- Parameters
state (quara.objects.state.State) –
num_sum (int) –
- Return type
List[Tuple[int, numpy.ndarray]]
- generate_empi_dists_sequence(state, num_sums)[source]¶
Generate sequence of empirical distributions using the data generated from probability distributions of all schedules.
- Parameters
state (State) – true object.
num_sums (List[int]) – list of the number of data to use to generate the experience distributions for each schedule.
- Returns
sequence of list of tuples for the number of data and experience distributions for each schedules.
- Return type
List[List[Tuple[int, np.ndarray]]]
- generate_empty_estimation_obj_with_setting_info()[source]¶
generates the empty estimation object with setting information.
- Returns
the empty estimation object(State) with setting information.
- Return type
- is_valid_experiment()[source]¶
returns whether the experiment is valid.
all of the following conditions are
True, the state is physically correct:all povms have same CompositeSystem.
- Returns
whether the experiment is valid.
- Return type
bool
- num_outcomes(schedule_index)[source]¶
returns the number of outcomes of probability distribution of a schedule index.
- Parameters
schedule_index (int) –
- Returns
the number of outcomes
- Return type
int
- property on_para_eq_constraint¶