1
$\begingroup$

Suppose I have a QuantumCircuit object qc, which contains some unentangled qubits, and a Hamiltonian whose expectation value I want to measure with respect to the state prepared by qc. Here is a minimum example :

from qiskit import QuantumCircuit, QuantumRegister
from qiskit.quantum_info import SparsePauliOp
qr = QuantumRegister(2)
qc = QuantumCircuit(qr)
qc.x(1)
Ham = SparsePauliOp(["ZI"], coeffs=[1])

As the two qubits of qc are not entangled, I can trace out either of them. For instance, since $\langle 1 | \sigma_Z | 1 \rangle =-1$, we can trace the leading qubit of the above circuit, and construct the reduced Hamiltonian

from qiskit import QuantumCircuit, QuantumRegister
from qiskit.quantum_info import SparsePauliOp
qr_reduced = QuantumRegister(1)
qc_reduced = QuantumCircuit(qr_reduced)
Ham_reduced = SparsePauliOp(["I"], coeffs=[-1])

These two systems will have the same expectation values.

I am curious to know, whether there are any python packages (ideally based on qiskit) that can trace out unentangled qubits this way?

$\endgroup$
1
  • $\begingroup$ On a simulator or real quantum computer you will basically ignore the results of those qubits. If you want an analytical way you basically need a partial trace function, this is implemented in QuTiP. $\endgroup$
    – D. A.
    Commented Nov 22, 2023 at 17:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.