Circuit Cutting#

Circuit Cutting (circuit_knitting.cutting).

Circuit Cutting#

cut_wires

Transform all CutWire instructions in a circuit to Move instructions marked for cutting.

expand_observables

Expand observable(s) according to the qubit mapping between original_circuit and final_circuit.

partition_circuit_qubits

Replace all nonlocal gates belonging to more than one partition with instances of TwoQubitQPDGate.

partition_problem

Separate an input circuit and observable(s).

cut_gates

Transform specified gates into TwoQubitQPDGates.

generate_cutting_experiments

Generate cutting subexperiments and their associated coefficients.

reconstruct_expectation_values

Reconstruct an expectation value from the results of the sub-experiments.

PartitionedCuttingProblem

The result of decomposing and separating a circuit and observable(s).

instructions.CutWire

An instruction for denoting a wire cut location.

instructions.Move

A two-qubit instruction representing a reset of the second qubit followed by a swap.

Quasi-Probability Decomposition (QPD)#

qpd.QPDBasis

Basis in which to decompose an operation.

qpd.BaseQPDGate

Base class for a gate to be decomposed using quasiprobability decomposition.

qpd.SingleQubitQPDGate

Single qubit gate to be decomposed using quasiprobability decomposition.

qpd.TwoQubitQPDGate

Two qubit gate to be decomposed using quasiprobability decomposition.

qpd.WeightType

Type of weight associated with a QPD sample.

qpd.generate_qpd_weights

Generate weights from the joint quasiprobability distribution.

qpd.decompose_qpd_instructions

Replace all QPD instructions in the circuit with local Qiskit operations and measurements.

qpd.qpdbasis_from_instruction

Generate a QPDBasis object, given a supported operation.

CutQC#

cutqc.run_subcircuit_instances

Execute all provided subcircuits.

cutqc.generate_summation_terms

Generate all summation terms for the final reconstructions.

cutqc.build

Reconstruct the full probability distribution from the subcircuits.

cutqc.verify

Compare the reconstructed probabilities to the ground truth.

cutqc.cut_circuit_wires

Decompose the circuit into a collection of subcircuits.

cutqc.evaluate_subcircuits

Evaluate the subcircuits.

cutqc.reconstruct_full_distribution

Reconstruct the full probabilities from the subcircuit evaluations.