`Circuit.from_pennylane()` already exists, but there's no conversion in the other direction.
`to_pennylane()` would let researchers build or import a circuit in Marqov (from Qiskit, OpenQASM, Braket, etc.) and carry it into PennyLane's optimisation and autodiff tooling — useful for variational workflows (VQE, QAOA, QML) where you want to train a fixed-structure circuit using PennyLane's gradient tools, then run the trained result at scale via Marqov.
Implementation notes
- Should return a `pennylane.tape.QuantumTape` — the right intermediate representation for a device-agnostic circuit in PennyLane
- Gate mapping reference: the existing `from_pennylane` import (circuits.py:552) has the PennyLane ↔ Marqov gate mapping already worked out — `to_pennylane` is the reverse
- Add a roundtrip test: `Circuit → tape → Circuit` should produce an equivalent circuit
- Requires `pennylane` in the `pennylane` extras group in `pyproject.toml` (already present)
`Circuit.from_pennylane()` already exists, but there's no conversion in the other direction.
`to_pennylane()` would let researchers build or import a circuit in Marqov (from Qiskit, OpenQASM, Braket, etc.) and carry it into PennyLane's optimisation and autodiff tooling — useful for variational workflows (VQE, QAOA, QML) where you want to train a fixed-structure circuit using PennyLane's gradient tools, then run the trained result at scale via Marqov.
Implementation notes