hybridlane.devices.preprocess ============================= .. py:module:: hybridlane.devices.preprocess Functions --------- .. autoapisummary:: hybridlane.devices.preprocess.static_analyze_tape hybridlane.devices.preprocess.null_postprocessing Module Contents --------------- .. py:function:: static_analyze_tape(tape, fill_missing = None) Circuit pass that validates a wire is only used as a qubit or a qumode This validates that once a wire is used in an operation as a qubit or a qumode, that its role remains the same in the rest of the circuit. This is physically motivated since a device cannot perform swap gates between qubits and qumodes (there would be truncation issues). Example .. code:: python # This would throw an error def bad_circuit(): qml.Displacement(alpha, 0, wires=[0]) qml.X(1) qml.H(0) # error: wire 0 became a qumode earlier during Displacement :param tape: The quantum circuit to check :param fill_missing: An optional string of ``("qubits", "qumodes")`` specifying what default to provide for unidentified wires :raises ~hybridlane.sa.StaticAnalysisError: :raises if its type cannot be inferred and no default is provided.: .. py:function:: null_postprocessing(results)