Software Sheet — SDK Rosetta Stone & Workflow Recipes (L05, L11–L12, L17)
The Stack¶
Algorithm circuit IR transpiler (basis gates + routing) pulses shots.
Portable interchange: OpenQASM 3. Debug order: statevector shots noise model QPU.
Rosetta Stone: Bell Pair¶
Qiskit
from qiskit import QuantumCircuit
qc = QuantumCircuit(2,2)
qc.h(0); qc.cx(0,1); qc.measure_all()Cirq
q = cirq.LineQubit.range(2)
c = cirq.Circuit([cirq.H(q[0]),
cirq.CNOT(q[0],q[1]), cirq.measure(*q)])PennyLane
@qml.qnode(qml.device("default.qubit", wires=2))
def bell():
qml.Hadamard(0); qml.CNOT(wires=[0,1])
return qml.probs()Braket
c = Circuit().h(0).cnot(0,1)pyQuil
p = Program(H(0), CNOT(0,1))Simulator Cheat Table¶
| Mode | Memory | Captures noise? |
|---|---|---|
| Statevector | no | |
| Shot sampler | shot noise | |
| Density matrix | Kraus channels | |
| Stabilizer | poly | Clifford only |
| Tensor network | entanglement-dep. | limited |
Transpilation Checklist (L05)¶
Which basis gates?
Coupling map / SWAP overhead?
Depth before vs. after (optimization level 0–3)?
Measured qubits mapped where? (layout matters for readout error)
Materials Pipeline Packages (L11–L12, L17)¶
openfermion / qiskit-nature / pennylane-qchem: molecule or lattice second-quantized Jordan–Wigner/BK Pauli sum.
pyscf: classical HF/DFT reference + integrals (active-space selection).
mitiq: ZNE / PEC error mitigation, SDK-agnostic.
Typical VQE skeleton:
H = jordan_wigner(molecular_hamiltonian)
E = minimize(lambda th:
expval(H, ansatz(th)), th0,
method="COBYLA")Reproducibility Habits¶
Pin package versions; log transpiled circuits + backend calibration snapshot with every result; report shots and error bars; seed simulators.
Course notebooks: set backend in the first cell — everything downstream is backend-agnostic.