|
numerics
|
Fluent quantum circuit builder and statevector simulator. More...
Go to the source code of this file.
Classes | |
| struct | num::Result |
| Measurement outcome from Circuit::run() More... | |
| struct | num::GateView |
| Compact gate description used by visualisation code. More... | |
| class | num::Circuit |
| Chainable quantum circuit builder. More... | |
Namespaces | |
| namespace | num |
Functions | |
| Circuit | num::bell_pair (int q0=0, int q1=1) |
| Bell state |Phi+> = (|00> + |11>)/sqrt2 on qubits q0, q1. | |
| Circuit | num::ghz_state (int n_qubits) |
| n-qubit GHZ state (|00...0> + |11...1>)/sqrt2 | |
| Circuit | num::qft_circuit (int n_qubits) |
| n-qubit Quantum Fourier Transform circuit Applied to |0...0> unless you prepend state-preparation gates. | |
| void | num::print_state (const quantum::Statevector &sv, int n_qubits, real threshold=1e-6) |
| Pretty-print a statevector, hiding amplitudes below threshold. | |
Fluent quantum circuit builder and statevector simulator.
Provides a chainable Circuit class that reads like a circuit diagram. Gates are recorded and replayed on a statevector on demand, so you can inspect intermediate states (step-through) or sample measurement outcomes.
Definition in file circuit.hpp.