Preparing the catalog and filters…Katalog ve filtreler hazırlanıyor…
Back to Learn
Lesson 1 / 6
Quantum AI with N/M
Encode data, train models, compare kernels, optimize MaxCut, and diagnose trainability
1/6
Data Encoding
10 minLesson 1
Compare angle, amplitude, and IQP encoding before choosing a model.
Core concept
Angle maps are direct and shallow; amplitude maps pack up to 2^n values but require normalization and first use; IQP maps add feature interactions through phases.
Practice task
Run the example, then switch angle to IQP and compare the trace and expectation.
Product link
Connect this idea back to the playground, docs, or QuantumSoftware platform map before moving on.
Runnable N/M example
module encoding_lab;
@dataset("xor_2d", split: "train");
fn main() {
let q: QReg<2> = qreg[2];
encode(sample_row(1), q, method: "angle");
let result = expect Z(q[0]) Z(q[1]);
return result;
}Playground opens the exact code shown here. Review and run it there; opening the link does not execute it.
Additional quiz prompts
- When must amplitude encoding run?
- How many amplitudes fit in n qubits?