Wire Cutting Phrased as a Two-Qubit `Move` Instruction
لم تُترجم بعد
هذه الصفحة لم تُترجم بعد. يتم عرض المحتوى باللغة الإنجليزية.
In this tutorial, we will reconstruct expectation values of a seven-qubit circuit by splitting it into two four-qubit circuits using wire cutting.
These are the steps that we will take in this Qiskit pattern:
- Step 1: Map problem to quantum circuits and operators:
- Map the hamiltonian onto a quantum circuit.
- Step 2: Optimize for target hardware [Uses the cutting addon]:
- Cut the circuit and observable.
- Transpile the subexperiments for hardware.
- Step 3: Execute on target hardware:
- Run the subexperiments obtained in Step 2 using a
Samplerprimitive.
- Run the subexperiments obtained in Step 2 using a
- Step 4: Post-process results [Uses the cutting addon]:
- Combine the results of Step 3 to reconstruct the expectation value of the observable in question.
Step 1: Map
Create a circuit to cut
First, we begin with a circuit inspired by Fig. 1(a) of arXiv:2302.03366v1.
# Added by doQumentation — required packages for this notebook
!pip install -q numpy qiskit qiskit-addon-cutting qiskit-aer qiskit-ibm-runtime
import numpy as np
from qiskit import QuantumCircuit
qc_0 = QuantumCircuit(7)
for i in range(7):
qc_0.rx(np.pi / 4, i)
qc_0.cx(0, 3)
qc_0.cx(1, 3)
qc_0.cx(2, 3)
qc_0.cx(3, 4)
qc_0.cx(3, 5)
qc_0.cx(3, 6)
qc_0.cx(0, 3)
qc_0.cx(1, 3)
qc_0.cx(2, 3)
<qiskit.circuit.instructionset.InstructionSet at 0x7f16ab191a80>
qc_0.draw("mpl")
