Circuit Cutting

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

  1. Input a Quantum Circuit: Provide a quantum circuit in OpenQASM format.
  2. Run the send_circuit_cut_job Method: Divi sends it to the the Qoro API for processing.
    • The fragments are created based on the QPUs, to optimize for qubit utilization and parallelization
    • The created job IDs are returned
    • The jobs can be tracked as the services execute to run the fragments
  3. Execute Fragments: Each fragment is run in parallel over the connected simulators or quantum hardware.
  4. Stitch Results: Once all of the fragments are executed, Divi will run circuit stitching to combine all of the results.

Example

Here’s a Python example using Divi:

from divi.services import QoroService

qasm_str = """OPENQASM 2.0;
                include "qelib1.inc";
                qreg q[9];
                creg c[9];
                h q[0];
                h q[1];
                x q[2];
                h q[3];
                z q[4];
                h q[5];
                h q[6];
                x q[7];
                h q[8];                    
                cx q[1], q[6];
                cx q[1], q[7];                    
                measure q[0] -> c[0];
                measure q[1] -> c[1];
                measure q[2] -> c[2];
                measure q[3] -> c[3];
                measure q[6] -> c[6];
                measure q[7] -> c[7];"""
q_service = QoroService(QORO_API_KEY)
jobs = q_service.send_circuit_cut_job(qasm_str)
q_service.poll_job_status(jobs, loop_until_complete=True)
results = q_service.get_job_results(jobs)    
compare_results(results, no_cut_result)

Benefits

  • Scalability: Run circuits with more qubits than your QPU supports.
  • Backend Flexibility: Mix and match different simulators or devices.