1. Home
  2. Explore
  3. Computer Science
  4. Atos Quantum Learning Machine

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Atos Quantum Learning Machine

Speaker 1Speaker 2

Atos Quantum Learning Machine

15:44
0:00-15:44
  1. Anna

    Welcome to our quantum-software session. We’ll explore two different classical tools for working with quantum algorithms: Atos’s Quantum Learning Machine, or QLM, and Argonne’s Qtensor simulator. One focuses on programming, optimization, and simulation across different backends; the other uses tensor networks, with a particular focus on simulating QAOA.

  2. Michael

    Let’s begin with QLM. Thomas introduced myQLM, the free laptop version, which we’ll use for small examples and a hands-on variational algorithm. The larger QLM is a classical high-performance computing system, available remotely in some settings, with more extensive simulation capabilities.

  3. Anna

    That distinction matters. myQLM is useful for learning and toy circuits, while the full QLM can use substantial memory for more demanding perfect or noisy simulations. Thomas also described QLM as a Service: you can write a program on your laptop and send it to a QLM server when you have access.

  4. Michael

    QLM is more than a simulator, too. It includes programming libraries for quantum circuits, optimization tools that account for hardware constraints, and circuit-compilation capabilities. Atos emphasized that its background in high-performance computing informs its work connecting processors and integrating them into larger systems.

  5. Anna

    And it can work alongside other quantum software frameworks. A circuit written in QLM can be run through a Qiskit backend, and a Qiskit circuit can be brought to QLM for simulation or optimization. Thomas also mentioned compatibility with Cirq, and a connector to Rigetti’s system.

  6. Michael

    The broader point is that a program doesn’t necessarily have to stay tied to the framework where it was first written. You can keep much of the same job and change the backend, whether that backend is a simulator or, if you have access, a quantum processor.

  7. Anna

    Before the example, let’s clarify why noisy simulation is important. In the NISQ era—Noisy Intermediate-Scale Quantum computing—devices can have errors in initialization, gates, and readout. A noise model describes some of those imperfections so researchers can study how they affect a computation.

  8. Michael

    QLM’s noise support can represent a range of models. Thomas said circuit-based noise can use quantum-channel descriptions, while analog schedules have other ways of specifying noise, including operators. He also described flexibility in modeling gate errors, readout errors, and initialization errors.

  9. Anna

    For a comparison question, Thomas’s answer was that QLM and other simulators aren’t simply a matter of one being universally better. QLM’s distinctive strengths include its simulation hardware and its emphasis on compilation from hardware-independent circuits to hardware-specific constraints, such as connectivity.

  10. Michael

    He also described several simulator approaches. Alongside linear-algebra simulation, QLM offers Clifford- or stabilizer-based simulation and matrix product state simulation, which can be useful when circuit entanglement is not too high. Its noisy simulations can be deterministic or stochastic.

  11. Anna

    One participant asked about the source of noise. The answer was that users can choose noise models, including operators for quantum operations, and specify models for readout and initialization. The practical lesson is that the simulation can reflect the error assumptions you want to investigate.

  12. Michael

    But the hands-on exercise uses a much simpler noisy simulator in myQLM, not the full QLM’s more capable noisy-simulation system. It adds depolarizing noise after one- and two-qubit gates. That makes it a useful teaching example, but not a demonstration of the full system’s performance.

  13. Anna

    The tutorial starts in a Binder-hosted Jupyter notebook, so the software is already installed in that environment. The first small circuit checks its output probabilities on a perfect simulator. For a Bell-state circuit, the two possible outcomes are zero-zero and one-one, each with probability one-half.

  14. Michael

    With a perfect state simulator, you can inspect amplitudes as well as probabilities. In the Bell-state example, each of those two outcomes has amplitude one over the square root of two. With a noisy simulator, you generally work with sampled probabilities instead of directly accessing the perfect state’s amplitudes.

  15. Anna

    Next, the notebook introduces a job: it can contain a circuit and an observable to measure. If you submit a circuit without an observable, the result gives information about the final measurement outcomes. If you include an observable, the result can report its average value.

  16. Michael

    An observable can be written as a sum of terms: each term has a coefficient, a product of Pauli operators, and the qubits those operators act on. The qubit indices are specified separately, so an X on qubit zero and a Y on qubit one is different from an X on qubit one and a Y on qubit zero.

  17. Anna

    The main example uses a two-qubit Heisenberg Hamiltonian with equal coupling set to one: an XX term, a YY term, and a ZZ term. For a small problem like this, you can construct its matrix and inspect its eigenvalues. The lowest eigenvalue is minus three, which becomes the target ground-state energy.

  18. Michael

    The strategy for finding that energy is the variational method, often called VQE in this context. You choose a parameterized quantum circuit, or ansatz, and use a classical optimizer to adjust its gate angles. The circuit’s measured Hamiltonian expectation value is the quantity the optimizer tries to minimize.

  19. Anna

    In myQLM, the circuit parameters are variables rather than fixed angles. The job includes the circuit and the Hamiltonian, and the initial parameter values provide the optimizer with a starting point. A variational plugin sits in front of the QPU interface so it can recognize the parameterized job and optimize those angles.

  20. Michael

    The first ansatz has two single-qubit Y rotations, with two adjustable angles, but no two-qubit entangling gate. Starting from one set of angles, the optimizer reaches an energy of minus one—not the desired minus three. Trying another initial guess doesn’t solve the central problem.

  21. Anna

    Why not? Because single-qubit gates alone produce product states, while the ground state needed here is entangled. Changing the starting angles can’t make that circuit express a state it has no way to create. The circuit needs an entangling operation.

  22. Michael

    So the tutorial adds a CNOT between qubits zero and one. With that change, the optimizer reaches minus three in just a few steps in the perfect-simulation example. It’s a clear illustration that the ansatz’s structure can matter as much as the classical optimizer.

  23. Anna

    Now comes the noisy version. The notebook places a depolarizing-noise plugin in front of the perfect QPU, creating a noisy QPU that accepts jobs in the same basic way. The variational code stays nearly the same; the main change is which QPU backend the optimizer uses.

  24. Michael

    The noisy run takes longer because it repeatedly evaluates a parameterized computation, and the example uses stochastic simulation and sampling. In Thomas’s run, the final energy was about minus 2.77 rather than minus three. That difference shows how gate noise can affect the estimated result.

  25. Anna

    The tutorial suggests examining more than the final energy. Look at whether the optimization converges to the right value, how quickly it converges, and whether it might converge quickly to an incorrect value. You can also increase the noise level or try systematic errors and random Hamiltonians from the notebook’s bonus examples.

  26. Michael

    And remember that the notebook’s simple noise plugin is not the full QLM noisy simulator. If you have access to a QLM server, you can write locally and send work to that service. Or you can switch to a Qiskit backend and, with the appropriate account and backend access, try running the job on IBM’s cloud hardware.

  27. Anna

    That wraps up the QLM lesson: write a circuit, describe the observable, optimize variational parameters, and compare ideal and noisy results. Now let’s turn to Qtensor, an Argonne tensor-network simulator developed with a particular focus on QAOA simulations.

  28. Michael

    A quantum circuit simulator runs quantum algorithms on classical computers. It can help find parameters for variational algorithms, debug circuits, or check quantum hardware. Qtensor’s workflow begins with an optimization problem, such as MaxCut, converts it into a circuit, represents the circuit as a tensor network, finds a contraction order, and contracts the network to calculate a result.

  29. Anna

    In MaxCut, you assign one of two colors to each vertex of a graph and try to maximize the number of edges whose endpoints have different colors. QAOA represents the problem with a Hamiltonian and a parameterized circuit. Its parameters, commonly called gamma and beta, are adjusted to improve the expected objective value.

  30. Michael

    Qtensor takes advantage of the structure of that objective. The MaxCut cost is a sum of terms associated with edges, and each term involves a local pair of vertices. When calculating an edge’s expectation value, parts of the full QAOA circuit that are sufficiently far from that edge cancel against their conjugate operations.

  31. Anna

    That cancellation produces a smaller circuit for each edge contribution: its light cone, built from a subgraph around the edge. The tutorial describes including vertices within a distance set by the circuit depth, p. Instead of simulating the entire problem circuit for each contribution, Qtensor can simulate these smaller local circuits and sum their results.

  32. Michael

    This can have a surprising effect on random regular graphs. As the original graph gets larger, the local subgraphs can increasingly look like trees, with larger loops less common. Those changing subgraph structures affect how difficult the resulting tensor networks are to contract.

  33. Anna

    What is a tensor network? A tensor generalizes a vector or a matrix; a rank-three tensor, for instance, can be pictured as a cube. In the diagrammatic notation, a tensor is a graph vertex and each of its indices is an edge. When two tensors share an index, contracting that index means summing over it.

  34. Michael

    A quantum circuit maps naturally to this representation. A one-qubit gate becomes a tensor with input and output indices. A two-qubit gate has two inputs and two outputs, so it becomes a four-index tensor. The circuit can then be evaluated by contracting its tensor network.

  35. Anna

    The difficulty is choosing the contraction order. Each contraction can create a larger tensor, so an unwise order can demand a huge amount of memory. Qtensor looks for an efficient order by translating the tensor network into a line graph and using graph-theoretic tools, including tree-decomposition software.

  36. Michael

    In the line graph, the roles are transformed: tensor indices become vertices, and each tensor is represented by a fully connected group of vertices for its indices. To contract an index, you remove its vertex and connect its neighbors. The number of neighbors at that step determines how many indices the resulting tensor has.

  37. Anna

    For qubits, each index has dimension two. So if the contracted vertex has k neighbors, the resulting tensor has roughly two to the k elements. The largest number of neighbors encountered during the whole contraction is called the contraction width. It’s a useful predictor of both memory use and computational difficulty.

  38. Michael

    That’s why Qtensor seeks an ordering that keeps the number of neighbors small at every step. Diagonal gates can help simplify the line graph, and QAOA uses important diagonal two-qubit gates. Simplifying the representation can lead to a better contraction order.

  39. Anna

    The talk gave memory estimates to make that concrete. On a laptop, a contraction width around 27 or 28 is a rough practical limit, depending on available memory; width 27 corresponds to about four gigabytes in the example. A width around 32 was presented as a limit for a larger cluster with roughly 200 gigabytes.

  40. Michael

    The benchmarks also showed that difficulty does not always rise smoothly with the number of vertices in the original graph. The local subgraphs can have different structures, and tree-like subgraphs can be easier to contract. The talk reported simulations reaching larger sizes on a supercomputer, including QAOA energy calculations for p equals six on the Theta system.

  41. Anna

    Qtensor’s listed capabilities go beyond those energy calculations. It can simulate probability amplitudes for general quantum circuits, and the speaker noted that once one amplitude is accessible, batches of amplitudes can sometimes be calculated for roughly the same cost. It also supports parallelization.

  42. Michael

    Another notable feature is automatic differentiation. By using PyTorch-compatible simulation, Qtensor can calculate gradients with respect to circuit parameters such as rotation angles. That can help optimize variational circuits without estimating each gradient by repeatedly sampling nearby parameter settings.

  43. Anna

    The hands-on portion uses composers with similar interfaces for Qtensor’s Q tree layer, Qiskit, and Cirq. You create a composer, add circuit elements, and access the resulting circuit. Qtensor can simulate an amplitude, or return a batch of amplitudes for selected qubits; asking for all qubits gives the full output state.

  44. Michael

    For QAOA energy calculations, the composer can generate a light-cone circuit for an edge. A QAOA simulator then iterates over the graph’s edges, evaluates those contributions, and combines them into the energy expectation. Qtensor can also convert a Qiskit circuit for simulation.

  45. Anna

    To optimize parameters with gradients, the tutorial creates differentiable gamma and beta tensors and uses a torch-based composer and backend. After simulating the circuit, it defines a loss based on the energy, calculates gradients, and updates the parameters. The example also demonstrates using Adam, an optimizer from machine learning, instead of simple gradient descent.

  46. Michael

    For the full MaxCut objective, the process sums the simulated contributions from all graph edges before optimizing. That takes more computation than a single-edge example, but it demonstrates how the local light cones fit into a complete QAOA calculation. The notebook examples were available in the Qtensor repository, with some features on its development branch.

  47. Anna

    So the two tools illustrate different ways to make quantum algorithms useful on classical computers. QLM brings together programming, hardware-aware compilation, variational optimization, and perfect or noisy simulation. Qtensor specializes in efficient tensor-network contraction, especially for QAOA, using graph structure to reduce simulation costs.

  48. Michael

    And both make the same practical point: the details of the circuit, the simulator, and the problem structure matter. With QLM, the missing entangling gate kept the example from reaching the ground-state energy. With Qtensor, smart light-cone reduction and contraction ordering help determine whether a simulation fits within available time and memory.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent