コード例 #1
0
def test_two_q(two_q_tomo_fixture):
    qubits, results, u_rand = two_q_tomo_fixture
    process_choi_lin_inv_est = linear_inv_process_estimate(results, qubits)
    process_choi_est = pgdb_process_estimate(results, qubits)
    process_choi_true = kraus2choi(u_rand)
    np.testing.assert_allclose(process_choi_true, process_choi_lin_inv_est, atol=.1)
    np.testing.assert_allclose(process_choi_true, process_choi_est, atol=0.05)
コード例 #2
0
def test_single_q_pgdb(single_q_tomo_fixture):
    qubits, results, u_rand = single_q_tomo_fixture

    process_choi_est = pgdb_process_estimate(results, qubits=qubits)
    process_choi_true = kraus2choi(u_rand)
    np.testing.assert_allclose(process_choi_true, process_choi_est, atol=1e-2)