|
numerics
|
#include "quantum/circuit.hpp"#include <algorithm>#include <cmath>#include <cstdio>#include <iostream>#include <random>Go to the source code of this file.
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. | |