|
Maestro 0.3.1
Unified interface for quantum circuit simulation
|
For an ergonomic, Pythonic workflow similar to Qiskit, use the QuantumCircuit class to construct circuits programmatically in memory without writing QASM strings.
| Gate | Method | Parameters |
|---|---|---|
| Pauli-X | qc.x(qubit) | — |
| Pauli-Y | qc.y(qubit) | — |
| Pauli-Z | qc.z(qubit) | — |
| Hadamard | qc.h(qubit) | — |
| S | qc.s(qubit) | — |
| S† | qc.sdg(qubit) | — |
| T | qc.t(qubit) | — |
| T† | qc.tdg(qubit) | — |
| √X | qc.sx(qubit) | — |
| √X† | qc.sxdg(qubit) | — |
| K | qc.k(qubit) | — |
| Phase | qc.p(qubit, λ) | λ (radians) |
| Rx | qc.rx(qubit, θ) | θ (radians) |
| Ry | qc.ry(qubit, θ) | θ (radians) |
| Rz | qc.rz(qubit, θ) | θ (radians) |
| U | qc.u(qubit, θ, φ, λ) | 3 angles (Euler) |
| CNOT | qc.cx(ctrl, tgt) | — |
| CY | qc.cy(ctrl, tgt) | — |
| CZ | qc.cz(ctrl, tgt) | — |
| CH | qc.ch(ctrl, tgt) | — |
| CSX | qc.csx(ctrl, tgt) | — |
| CSX† | qc.csxdg(ctrl, tgt) | — |
| SWAP | qc.swap(q1, q2) | — |
| CP | qc.cp(ctrl, tgt, λ) | λ |
| CRx | qc.crx(ctrl, tgt, θ) | θ |
| CRy | qc.cry(ctrl, tgt, θ) | θ |
| CRz | qc.crz(ctrl, tgt, θ) | θ |
| CU | qc.cu(ctrl, tgt, θ, φ, λ, γ) | 4 angles |
| Toffoli | qc.ccx(c1, c2, tgt) | — |
| Fredkin | qc.cswap(ctrl, q1, q2) | — |
| Delay | qc.delay(qubit, duration) | duration in seconds |
Physical idling periods can be scheduled on specific qubits using qc.delay(). Durations are specified in seconds (e.g., 100e-9 for 100 ns, 50e-6 for 50 us).
In noiseless simulation, delay acts as an identity. Under noisy simulation, it triggers idle thermal relaxation (T1/T2), continuous-time Ornstein-Uhlenbeck phase drift, and coherent detuning rotation according to the configured NoiseModel (see Noise Simulation Manual).
Expectation values can be estimated directly on a QuantumCircuit instance without adding measurement operations: