Suppose I have a
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=)
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?