cirq.experiments.two_qubit_state_tomography¶

cirq.experiments.
two_qubit_state_tomography
(sampler: cirq.work.sampler.Sampler, first_qubit: cirq.devices.grid_qubit.GridQubit, second_qubit: cirq.devices.grid_qubit.GridQubit, circuit: cirq.circuits.circuit.Circuit, repetitions: int = 1000) → cirq.experiments.qubit_characterizations.TomographyResult[source]¶ Twoqubit state tomography.
To measure the density matrix of the output state of a twoqubit circuit,different combinations of I, X/2 and Y/2 operations are applied to thetwo qubits before measurements in the zbasis to determine the stateprobabilities P_00, P_01, P_10.The density matrix rho is decomposed into an operatorsum representation\sum_{i, j} c_ij * sigma_i \bigotimes sigma_j, where i, j = 0, 1, 2,3 and sigma_0 = I, sigma_1 = sigma_x, sigma_2 = sigma_y, sigma_3 =sigma_z are the singlequbit Identity and Pauli matrices.Based on the measured probabilities probs and the transformations of themeasurement operator by different basis rotations, one can build anoverdetermined set of linear equations.As an example, if the identity operation (I) is applied to both qubits,the measurement operators are (I +/ sigma_z) \bigotimes (I +/ sigma_z).The state probabilities P_00, P_01, P_10 thus obtained contribute to thefollowing linear equations (setting c_00 = 1):c_03 + c_30 + c_33 = 4P_00  1 c_03 + c_30  c_33 = 4P_01  1c_03  c_30  c_33 = 4*P_10  1And if a Y/2 rotation is applied to the first qubit and a X/2 rotationis applied to the second qubit before measurement, the measurementoperators are (I /+ sigma_x) \bigotimes (I +/ sigma_y). The probabilitiesobtained instead contribute to the following linear equations:c_02  c_10  c_12 = 4P_00  1 c_02  c_10 + c_12 = 4P_01  1c_02 + c_10 + c_12 = 4*P_10  1Note that this set of equations has the same form as the first set underthe transformation c_03 <> c_02, c_30 <> c_10 and c_33 <> c_12.Since there are 9 possible combinations of rotations (each producing 3independent probabilities) and a total of 15 unknown coefficients c_ij,one can cast all the measurement results into a overdetermined set oflinear equations numpy.dot(mat, c) = probs. Here c is of length 15 andcontains all the c_ij’s (except c_00 which is set to 1), and mat is a 27by 15 matrix having three nonzero elements in each row that are either1 or 1.The leastsquare solution to the above set of linear equations is thenused to construct the density matrix rho.See Vandersypen and Chuang, Rev. Mod. Phys. 76, 1037 for details andSteffen et al, Science 313, 1423 for a related experiment. Parameters
sampler – The quantum engine or simulator to run the circuits.
first_qubit – The first qubit under test.
second_qubit – The second qubit under test.
circuit – The circuit to execute on the qubits before tomography.
repetitions – The number of measurements for each basis rotation.
 Returns
A TomographyResult object that stores and plots the density matrix.