Back to News
quantum-computing

Quantum Computing from Scratch

Reddit r/QuantumComputing (RSS)
Loading...
2 min read
0 likes
⚡ Quantum Brief
A mathematician with no formal computer science background is experimenting with quantum computing fundamentals by building a Python-based implementation from scratch, focusing on qubits and single-qubit gates. The project aims to test basic quantum operations but faces challenges scaling to multi-qubit systems, particularly with two-qubit gates like CNOT, where tensor product representations create confusion. The user questions whether larger-dimensional matrices suffice for multi-qubit gates, unsure how to extract single-qubit results from the combined state space of ℂ² ⊗ ... ⊗ ℂ². Practical applications, such as a qubit-swapping algorithm, remain unclear due to gaps in understanding how to manipulate tensor product states programmatically. Despite acknowledging inefficiencies, the effort prioritizes learning over optimization, with shared code snippets serving as a discussion starter for quantum gate implementation.
Quantum Computing from Scratch

Summarize this article with:

Hello! I'm trying to learn the subject and thought that, although really suboptimal in topics as speed and replicability, I should try implementing the basic concepts from scratch using python. This may seem like a stupid idea, and it may actually BE a stupid idea, but that's not what I am here to discuss, I like to make this clear just to prevent comments like "you shouldn't be doing that". Now, I implemented the notion of a qubit and a quantum gate for single qubits. I'll leave prints of the code down here. The thing is, I have some doubts on the functioning of multiple qubit gates. Implementing qubits Implementing quantum gates basic gates Now, I am not in any way a computer guy, my background is actually in math, so my code may have some problems in the aspect of "good coding", but it works (or did so in my tests). About my real problem: how one would go about implementing two-bit gates? My first example is CNOT. I thought i'd just do the same thing, but with matrices of bigger dimensions, but... does that work? The input should be the tensor product of the qubits, right? a n-qubit gate is a map from ℂ² ⊗ ... ⊗ ℂ² to itself, so how do I get results on single qubits? How would I do, I don't know, a swapping algorithm using this? I'm really confused. submitted by /u/Giraldi3G [link] [comments]

Read Original

Tags

government-funding
quantum-computing
quantum-hardware

Source Information

Source: Reddit r/QuantumComputing (RSS)