0

I want to make the density matrix on qiskit.

The state is ρ=[7/9,0 ; 0, 2/9].

At first, I'm gonna make that matrix by unitrary transform from |0>.

But I realize that it cannot happend.

Because there is no unitary transform which satisfy U|0><0|U(Dagger) = [7/9,0 ; 0, 2/9].

How to do it on qiskit very simply?

making the arbitrary density matrix on qiskit.

1 Answers1

0

Use the DensityMatrix class in Qiskit. Documentation page is: https://qiskit.org/documentation/stubs/qiskit.quantum_info.DensityMatrix.html. Use the code:

import qiskit
from qiskit.quantum_info import DensityMatrix
my_dm = DensityMatrix([[7/9, 0],[0, 2/9]])