1

On a quantum computer, there is no point in implementing a partial trace. Just ignore the qubits which you want to trace.


1

qiskit.quantum_info has a partial_trace method you can use for this. It takes as input either a Statevector or a DensityMatrix object. Both these classes implement the from_instruction routine that you can use with the QuantumCircuit object you already have. You would have to do something along the lines of: circuit2 = QuantumCircuit(4,3) ... # your ...


Only top voted, non community-wiki answers of a minimum length are eligible