quara.interface.qutip.api module
- estimate_standard_povmt_from_qutip(mode_system, num_system, tester_states, num_outcomes, empi_dists, estimator_name, schedules)[source]
Calculates estimate variables and returns an estimate of a quantum state by executing POVM tomography using tester states and empirical distributions.
- Parameters
mode_system (str) – “qubit” or “qutrit”
num_system (int) – number of qubits or qutrits
tester_states (List[Qobj]) – testers of POVMT.
num_outcomes (int) – number of outcome values of the POVM that will be estimated.
empi_dists (List[Tuple[int, np.ndarray]]) – empirical distributions to calculate estimates of variables.
estimator_name (str) – “linear” or “least_squares”.
schedules (Union[List[List[Tuple]], str]) – schedule of the experiment.
- Returns
estimated result of the POVM.
- Return type
Qobj
- Raises
ValueError –
estimator_nameis invalid.
- estimate_standard_qpt_from_qutip(mode_system, num_system, tester_states, tester_povms, empi_dists, estimator_name, schedules)[source]
Calculates estimate variables and returns an estimate of a quantum gate by executing quantum process tomography using tester states, tester POVMs and empirical distributions.
- Parameters
mode_system (str) – “qubit” or “qutrit”
num_system (int) – number of qubits or qutrits
tester_states (List[Qobj]) – tester states of QPT.
tester_povms (List[List[Qobj]]) – tester POVMs of QPT.
empi_dists (List[Tuple[int, np.ndarray]]) – empirical distributions to calculate estimates of variables.
estimator_name (str) – “linear” or “least_squares”.
schedules (Union[List[List[Tuple]], str]) – schedule of the experiment.
- Returns
estimated result of the quantum gate in super representation.
- Return type
Qobj
- Raises
ValueError –
estimator_nameis invalid.
- estimate_standard_qst_from_qutip(mode_system, num_system, tester_povms, empi_dists, estimator_name, schedules)[source]
Calculates estimate variables and returns an estimate of a quantum state by executing quantum state tomography using tester POVMs and empirical distributions.
- Parameters
mode_system (str) – “qubit” or “qutrit”
num_system (int) – number of qubits or qutrits
tester_povms (List[List[Qobj]]) – testers of QST.
empi_dists (List[Tuple[int, np.ndarray]]) – empirical distributions to calculate estimates of variables.
estimator_name (str) – “linear” or “least_squares”.
schedules (Union[List[List[Tuple]], str]) – schedule of the experiment.
- Returns
estimated result of the quantum state.
- Return type
Qobj
- Raises
ValueError –
estimator_nameis invalid.
- generate_empi_dists_from_qutip_gate(mode_system, num_system, true_gate, tester_states, tester_povms, num_sum, seed, schedules)[source]
Generate empirical distributions using the data generated from probability distribution of specified schedules.
- Parameters
mode_system (str) – “qubit” or “qutrit”
num_system (int) – number of qubits or qutrits
true_state (Qobj) – true quantum state.
tester_states (List[List[Qobj]]) – tester states of QPT.
tester_povms (List[List[Qobj]]) – tester POVMs of QPT.
num_sum (int) – number of observations per POVM.
seed (int) – seed number for generating random number.
schedules (Union[List[List[Tuple]], str]) – schedule of the experiment.
true_gate (qutip.qobj.Qobj) –
- Returns
Empirical distribution which is a List of empirical probabilities.
- Return type
List[Tuple[int, ndarray]]
- generate_empi_dists_from_qutip_povm(mode_system, num_system, true_povm, tester_states, num_sum, seed, schedules)[source]
Generate empirical distributions using the data generated from probability distribution of specified schedules.
- Parameters
mode_system (str) – “qubit” or “qutrit”
num_system (int) – number of qubits or qutrits
true_povm (Qobj) – true POVM.
tester_states (List[List[Qobj]]) – testers of POVMT.
num_sum (int) – number of observations per state.
seed (int) – seed number for generating random number.
schedules (Union[List[List[Tuple]], str]) – schedule of the experiment.
- Returns
Empirical distribution which is a List of empirical probabilities.
- Return type
List[Tuple[int, ndarray]]
- generate_empi_dists_from_qutip_state(mode_system, num_system, true_state, tester_povms, num_sum, seed, schedules)[source]
Generate empirical distributions using the data generated from probability distribution of specified schedules.
- Parameters
mode_system (str) – “qubit” or “qutrit”
num_system (int) – number of qubits or qutrits
true_state (Qobj) – true quantum state.
tester_povms (List[List[Qobj]]) – testers of QST.
num_sum (int) – number of observations per POVM.
seed (int) – seed number for generating random number.
schedules (Union[List[List[Tuple]], str]) – schedule of the experiment.
- Returns
Empirical distribution which is a List of empirical probabilities.
- Return type
List[Tuple[int, ndarray]]
- least_squares_estimator_wrapper(qtomography, empi_dists, mode_weight)[source]
- Parameters
qtomography (quara.protocol.qtomography.standard.standard_qtomography.StandardQTomography) –
empi_dists (List[Tuple[int, numpy.ndarray]]) –
mode_weight (str) –
- Return type