qubit_argument/argument/constraint/comparison_constraint.rs
1// =============================================================================
2// Copyright (c) 2025 - 2026 Haixing Hu.
3//
4// SPDX-License-Identifier: Apache-2.0
5//
6// Licensed under the Apache License, Version 2.0.
7// =============================================================================
8//! Scalar comparison constraints.
9
10use crate::argument::ArgumentValue;
11
12/// A comparison between an argument and a captured scalar value.
13#[derive(Debug, Clone, PartialEq, Eq)]
14pub enum ComparisonConstraint {
15 /// Requires equality with the captured value.
16 EqualTo(ArgumentValue),
17 /// Requires inequality with the captured value.
18 NotEqualTo(ArgumentValue),
19 /// Requires a value strictly less than the captured value.
20 LessThan(ArgumentValue),
21 /// Requires a value less than or equal to the captured value.
22 AtMost(ArgumentValue),
23 /// Requires a value strictly greater than the captured value.
24 GreaterThan(ArgumentValue),
25 /// Requires a value greater than or equal to the captured value.
26 AtLeast(ArgumentValue),
27}