Loading...
Searching...
No Matches
GaussianPolynomial.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <Eigen/Core>
8#include <optional>
9#include <vector>
10
11namespace gpr::quantum {
12
14 Eigen::VectorXd mean;
15 Eigen::MatrixXd covariance;
16};
17
19 long double coefficient{};
20 std::vector<unsigned> powers;
21};
22using SparsePolynomial = std::vector<PolynomialTerm>;
23
25 long double value{};
26 long double absoluteRoundoffBound{};
27};
28
38
39// The covariance must represent a symmetric positive-semidefinite Gaussian
40// law. Arithmetic-sized validation ambiguities are reported without changing
41// the supplied covariance or removing any direction. Conditional feature
42// covariance from a constrained Gaussian solve is an ordinary GaussianLaw.
44 const GaussianLaw& law, const SparsePolynomial& polynomial,
45 std::optional<long double> eventProbabilityBound = std::nullopt);
46
47// For an event with probability at most p, this bounds E[|polynomial| 1_event]
48// by sqrt(E[polynomial^2] p), including the second moment's arithmetic
49// allowance. The event certificate and the Gaussian-model assumptions belong to
50// the caller.
51long double weightedEventBound(const GaussianPolynomialMoments& moments,
52 long double probabilityBound);
53
54} // namespace gpr::quantum
Models for quantum-path (instanton) searches: arc and tail actions, amplitude continuation.
GaussianPolynomialMoments evaluateGaussianPolynomial(const GaussianLaw &law, const SparsePolynomial &polynomial, std::optional< long double > eventProbabilityBound)
long double weightedEventBound(const GaussianPolynomialMoments &moments, long double probabilityBound)
std::vector< PolynomialTerm > SparsePolynomial
std::optional< long double > weightedEventAbsoluteBound
std::vector< unsigned > powers