Quantum AI: Tensor Networks with NumPy

Intermediate Quantum AI
Created by Best · 12.04.2026 at 16:05 UTC

Tensor networks are compact representations of high-dimensional tensors that appear in quantum many-body physics and, increasingly, in machine learning. This card covers basic tensor contractions with NumPy (np.einsum, np.tensordot) and the concept of Matrix Product States (MPS).

University approvals: 0
Tasks
Question 1

Given two 2x2 matrices A and B (elements supplied as two rows of 4 space-separated floats each), compute the trace of A @ B and print it with 4 decimal places.

3 test cases will be used for grading
Run checks runtime behavior only. Final correctness is evaluated when you submit.
Question 2

In a Matrix Product State (MPS) decomposition of a quantum state, what does the "bond dimension" control?

Card Info
  • Topic: Quantum AI
  • Difficulty: Intermediate
  • Completed: 0 users
Creator
Best
Best
BestBuddy