quchip.engine.assembly¶
Assemble an EngineResult from chip physics, controls, and frame.
Hamiltonians enter in ordinary GHz and are scaled by 2π to rad/ns for
d|ψ⟩/dt = -i H |ψ⟩. Carrier and observable-demodulation phases convert
frequencies to rad/ns as well, and solver hints convert them back to GHz for
display.
Rotating frames subtract Σᵢ ω_frame,ᵢ nᵢ from the static Hamiltonian.
Coupling and drive operators split into excitation-change bands with weight
w = col - row and carriers exp(-i w·ω t).
Exact keeps every band.
RWA keeps total-excitation-conserving static
bands and matches delivered-signal bands to operator bands. Time dependence is
represented by SignalProgram expressions, which
backends lower to native coefficients.
References: Scully & Zubairy, Quantum Optics (1997), §5.1; Jaynes & Cummings, Proc. IEEE 51, 89 (1963); Walls & Milburn, Quantum Optics (2008), §10.3; Gambetta et al., PRA 74, 042318 (2006); Magesan & Gambetta, PRA 101, 052308 (2020).
Functions
|
Compile the template and instantiate one engine-result variant. |
|
Compile the invariant Hamiltonian skeleton (H₀, couplings, pre-embedded drive bands). |
|
Return nonzero interaction bands for frame planning. |
|
Yield kept band records, embedded operators, term indices and original signal weights. |
|
Rebuild signal-program leaves from drive_ops and attach them to the template's operators. |
|
Return the excitation-change bands of one quantum port's coupling |
Classes
|
One excitation-change band of an authored operator, with its charge vector. |
|
One |
|
One projected operator band from an authored drive Hamiltonian term. |
- class quchip.engine.assembly.BandRecord(devices, charges, amplitude, source, retained=False)[source]¶
Bases:
objectOne excitation-change band of an authored operator, with its charge vector.
charges[i]is the photon-number change the band applies todevices[i].amplitudeis the band’s largest concrete matrix element orNonewhen traced.
- quchip.engine.assembly.coupling_band_records(chip, resolution, backend)[source]¶
Return nonzero interaction bands for frame planning.
- quchip.engine.assembly.port_band_records(chip, port, resolution, backend)[source]¶
Return the excitation-change bands of one quantum port’s coupling
sqrt(kappa) A.
- class quchip.engine.assembly.CompiledDriveTerm(operator, delivered_key, hamiltonian_term_index, weight, device_frame_freq, filter_signal_bands, origin='drive', tag=None)[source]¶
Bases:
objectOne projected operator band from an authored drive Hamiltonian term.
- operator: CanonicalOperator¶
- class quchip.engine.assembly.CompiledCoherentTerm(operation_index, exposure, scattering, lowering, raising, frame_frequency)[source]¶
Bases:
objectOne
S[j, i] beta_icontribution to the canonical source drive.- lowering: CanonicalOperator¶
- raising: CanonicalOperator¶
- quchip.engine.assembly.drive_bands(chip, drive, target, bases, dims, backend, approximation, *, space=None, embed=True)[source]¶
Yield kept band records, embedded operators, term indices and original signal weights.
- quchip.engine.assembly.compile_hamiltonian_template(chip, drive_ops, *, resolved_frame, approximation=None, _local_resolution=None, _base_result=None, _advisories=None)[source]¶
Compile the invariant Hamiltonian skeleton (H₀, couplings, pre-embedded drive bands).
The template holds everything invariant across a homogeneous sweep: the static Hamiltonian, static-coupling folds, invariant dynamic couplings, and band-decomposed drive operators pre-embedded and pre-scaled by 2π. Per-sweep instantiation (
instantiate_engine_result()) rebuilds only theSignalProgramleaves. Envelope parameters, drive frequencies, phases, and frame scalars can therefore sweep through JAX without retracing operator tensors.
- quchip.engine.assembly.instantiate_engine_result(template, drive_ops, chip)[source]¶
Rebuild signal-program leaves from drive_ops and attach them to the template’s operators.
- quchip.engine.assembly.build_engine_result(chip, drive_ops, *, resolved_frame, approximation=None, _local_resolution=None, _base_result=None, _advisories=None)[source]¶
Compile the template and instantiate one engine-result variant.
Equivalent to
compile_hamiltonian_template()followed byinstantiate_engine_result()with the samedrive_ops. Prefer the two-step form when you solve many variants that share the same chip topology.- Parameters:
chip (Chip) – The chip whose device, coupling, and drive Hamiltonians are assembled (2π applied at this boundary).
drive_ops (list of ControlOp) – Scheduled classical-drive or coherent-field operations to embed as dynamic terms.
resolved_frame (ResolvedFrame) – Resolved frame carrying the per-device frame frequencies, demodulation frequencies, and frame mode.
- Returns:
Static terms, dynamic terms, and dropped-term records for the single variant.
- Return type: