Initialize circuit with a mixed state?

Hi,

I have a quantum circuit and I would like to train the parameters according to the labels with input to be mixed states. Is there any way I can initially set the circuit to be a mixed state with the density matrix, just like what we do with the function, QubitStateVector? Thank you very much.

Hi @bzzhang, and welcome to the Xanadu Discussion Forum!

Unfortunately, there’s no way to initialize a mixed state directly using a density matrix; you would have to create that state yourself using gates.

If you wish to simulate using mixed states you would have to use a mixed state simulator, e.g. default.mixed or cirq.mixedsimulator.

Let us know if you have any other questions or issues with this!