tensorcircuit.compiler.symbolic_compiler¶
Compiler passes for symbolic circuits.
- tensorcircuit.compiler.symbolic_compiler.lightcone_compile(circuit: SymbolCircuit, observable_qubits: Sequence[int]) Tuple[SymbolCircuit, Dict[str, Any]][source]¶
Compile a SymbolCircuit to the causal cone induced by a final observable’s qubit support.
The compiled circuit retains the original SymPy symbols, so callers may pass the complete symbol-to-value binding dictionary to
to_circuit; bindings for removed gates are ignored.- Parameters:
circuit (SymbolCircuit) – Symbolic circuit to compile.
observable_qubits (Sequence[int]) – Qubit support of the final observable.
- Returns:
Compiled circuit and mapping information.
observable_qubitscontains the remapped observable support, andlogical_physical_mappingmaps retained input qubits to compiled qubits.- Return type:
Tuple[SymbolCircuit, Dict[str, Any]]
- Raises:
ValueError – If the observable indices are empty, duplicated, or out of range.
NotImplementedError – If the circuit uses non-default inputs, channels, or extra QIR instructions.