Circuit Cutting
Divi provides a powerful interface for cutting quantum circuits into smaller, simulatable fragments — a critical technique for scaling quantum-classical hybrid applications beyond the limits of today’s hardware.
What is Circuit Cutting?
Circuit cutting is a technique used to break large quantum circuits into smaller, disjoint fragments. These fragments can be simulated independently and then recombined classically to reconstruct the original circuit’s outcome. This allows users to work with circuits larger than what a single device or simulator can handle.
Our version of circuit cutting generates all of the circuits at once, so they can be ran in parallel. Once complete, Divi can interface to recover the results of the principle circuit.
Why Use Divi for Circuit Cutting?
Divi automates the process of:
- Generating circuit fragments and classical post-processing rules
- Managing the execution of fragments on heterogeneous backends
- Reconstructing final results through stitching methods
- Uses the qubit counts of the network to make cuts to maximize utilization
How It Works
- Input a Quantum Circuit: Provide a quantum circuit in OpenQASM format using Divi.
- Run the
cut_circuit
Method: Divi analyzes the circuit and returns:- A list of circuit fragments (still in OpenQASM)
- The recommended number of shots for 1% accuracy
- Simulate or Execute Fragments: Each fragment can be run independently on simulators or quantum hardware.
- Stitch Results: Divi provides APIs to combine the measurement outcomes from each fragment to recover the original circuit’s probabilities.
Example
Here’s a Python example using Divi:
from divi.services import QoroService
# This circuit requires 4 wire cuts, and measures only 4 qubits for easier comparison.
qasm_circuit= 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[10];\ncreg meas[10];\nh q[0];\nh q[1];\nx q[2];\nh q[3];\nz q[4];\nh q[5];\nh q[6];\nx q[7];\nh q[8];\nz q[9];\ncx q[1], q[7];\ncx q[2], q[9];\nmeasure q[0] -> meas[0];\nmeasure q[1] -> meas[1];\nmeasure q[2] -> meas[2];\nmeasure q[3] -> meas[3];\nmeasure q[7] -> meas[4];\nmeasure q[8] -> meas[5];'
network = {"qreg": [5, 5], "creg": [5, 5]}
qoro_service = QoroService(API_KEY)
cut_data = qoro_service.cut_circuit(qasm_string, network)
parent_circuit = cut_data["circuit_id"]
# Each fragment can be run independently
fragments = cut_data["circuit_fragments"]
# A recommended number of shots to be within 1% of statistics
recommended_shots = cut_data["recommended_shots"]
fragment_results = []
for fragment in fragments:
# These can all be run in parallel
measurement_results = execute(fragment["circuit"])
fragment_results.append({"results": measurement_results, "label": fragment["label"]})
restored_results = qoro_service.restore_circuit(parent_circuit, fragment_results)
compare_results(restored_results, qasm_circuit)

Comparing cut and restored data and non-cut.
Benefits
- Scalability: Run circuits with more qubits than your QPU supports.
- Backend Flexibility: Mix and match different simulators or devices.