Quantum Modeling
Final learning stage: from binary decisions to a bounded, verifiable quantum-circuit experiment.
1. Variables, objectives and constraints
A binary variable xᵢ answers a yes/no choice. An objective assigns a score or energy to all choices. Constraints define which choices are acceptable. For Knapsack, selecting an item earns value, but total weight must fit capacity.
2. Penalties, QUBO and Ising
A penalty adds energy for breaking a constraint. Suitable coefficients matter: an insufficient penalty may reward an invalid answer. A QUBO is a quadratic objective over binary variables; Custom QUBO assumes that you encoded every needed constraint. Substitution x=(I−Z)/2 turns it into an Ising expression with Z and ZZ terms.
3. Hamiltonians and variational algorithms
A cost Hamiltonian assigns each basis state its objective value. Variational circuits change parameterized gates to seek useful output probabilities. QAOA alternates cost and mixer operations. Here it is one layer and a bounded grid of at most 64 angle pairs, not an advanced adaptive optimizer.
4. Classical verification
For ≤8 encoded qubits, every assignment can be enumerated. Compare measured candidates with that exact bounded reference. A good encoding, a correctly compiled circuit, and a good sampled answer are separate things to check.
5. Logical vs physical qubits; projection vs execution
A logical variable in the formulation needs one ideal qubit here. Physical hardware additionally has topology, errors and sometimes error-correction overhead. Large requested targets are symbolic projections, not executed statevectors or physical-qubit forecasts.
Work through Max-Cut and Custom QUBO, then inspect the methodology.