quara.interface.cvxpy.api module
- estimate_standard_povmt_with_cvxpy(tester_states, empi_dists, name_solver, estimator_name, schedules, num_outcomes)[source]
Estimate Povm using cvxpy.
- Parameters
tester_states (List[State]) – Testers of POVMT. A list of states.
empi_dists (np.ndarray) – Empirical distribution to calculate estimators of variables
name_solver (str) – Name of solver. “mosek”
estimator_name (str) – Name of estimator. “maximum-likelihood”, “approximate-maximum-likelihood”, or “least-squares”
schedules (Union[List[List[Tuple]], str]) – Schedule of the experiment
num_outcomes (int) – Number of outcome values of the POVM that will be estimated. An integer of 2 or more.
- Returns
Estimated Povm
- Return type
- estimate_standard_qmpt_with_cvxpy(tester_states, tester_povms, empi_dists, name_solver, estimator_name, schedules, num_outcomes)[source]
Estimate MProcess using cvxpy.
- Parameters
tester_states (List[State]) – Testers of QMPT. A list of states.
tester_povms (List[Povm]) – Testers of QMPT. A list of povms.
empi_dists (List[Tuple[int, np.ndarray]]) – Empirical distribution to calculate estimators of variables
name_solver (str) – Name of solver. “mosek”
estimator_name (str) – Name of estimator. “maximum-likelihood”, “approximate-maximum-likelihood”, or “least-squares”
schedules (Union[List[List[Tuple]], str]) – Schedule of the experiment
num_outcomes (int) – Number of outcome values of the POVM that will be estimated. An integer of 2 or more.
- Returns
Estimated MProcess
- Return type
- estimate_standard_qpt_with_cvxpy(tester_states, tester_povms, empi_dists, name_solver, estimator_name, schedules)[source]
Estimate Gate using cvxpy.
- Parameters
tester_states (List[State]) – Testers of QMPT. A list of states.
tester_povms (List[Povm]) – Testers of QPT. A list of povms.
empi_dists (List[Tuple[int, np.ndarray]]) – Empirical distribution to calculate estimators of variables
name_solver (str) – Name of solver. “mosek”
estimator_name (str) – Name of estimator. “maximum-likelihood”, “approximate-maximum-likelihood”, or “least-squares”
schedules (Union[List[List[Tuple]], str]) – Schedule of the experiment
- Returns
Estimated Gate
- Return type
- estimate_standard_qst_with_cvxpy(tester_povms, empi_dists, name_solver, estimator_name, schedules)[source]
Estimate State using cvxpy.
- Parameters
tester_povms (List[Povm]) – Testers of QST. A list of povms.
empi_dists (List[Tuple[int, np.ndarray]]) – Empirical distribution to calculate estimators of variables
name_solver (str) – Name of solver. “mosek”
estimator_name (str) – Name of estimator. “maximum-likelihood”, “approximate-maximum-likelihood”, or “least-squares”
schedules (Union[List[List[Tuple]], str]) – Schedule of the experiment
- Returns
Estimated State
- Return type
- estimate_standard_qtomography_with_cvxpy(type_qoperation, tester, schedules, empi_dists, estimator_name, name_solver, num_outcomes=None)[source]
Estimate QOperation using cvxpy.
- Parameters
type_qoperation (str) – Type of QOperation to be estimated. “state”, “povm”, “gate”, or “mprocess”.
tester (List[QOperation]) – A list in which tester objects are stored. When estimating state, a list of povms. When estimating povm, a list of states. When estimating gate or mprocess, a list of states and povms.
schedules (Union[List[List[Tuple]], str]) – Schedule of the experiment
empi_dists (List[Tuple[int, np.ndarray]]) – Empirical distribution to calculate estimators of variables
estimator_name (str) – Name of estimator. “maximum-likelihood”, “approximate-maximum-likelihood”, or “least-squares”
name_solver (str) – Name of solver. “mosek”
num_outcomes (int, optional) – Number of outcome values of the POVM or MProcess that will be estimated. If “povm” or “mprocess” is specified for type_qoperation, it is specified. An integer of 2 or more.
- Returns
Estimated QOperation
- Return type
- Raises
TypeError – If type_qoperation is ‘povm’ or ‘mprocess’, then the type of num_outcomes must be int.
ValueError – If type_qoperation is ‘povm’ or ‘mprocess’, then num_outcomes must be greater than or equal to 2.
ValueError – type_qoperation must be ‘state’, ‘povm’, ‘gate’, or ‘mprocess’.