←
Real Python86,093 posts
Real Python avatar

Real Python

@realpython

Helping Python developers build with AI: apps, agents, models, and AI-assisted coding. Expert-reviewed tutorials and courses, read by 1M+ developers a month.

◷ Joined August 2012▧ 7,592 Photos and videos
Real Python avatar
Real Python@realpython·3h

5. You can design a quantum circuit on your laptop with Qiskit. qc.h(0) puts a qubit into an equal superposition of 0 and 1, and qc.measure(0, 0) reads it into a classical bit. Run the circuit 10,000 times on a simulator and roughly half the results are 0, half 1.

Post attachment
Real Python avatar
Real Python@realpython·3h

4. Quantum advantage on broadly useful problems isn't here yet. Most of today's noisy intermediate-scale quantum (NISQ) machines have under 1,000 qubits. Qubits can lose their quantum state in microseconds, and control pulses, crosstalk and calibration drift add errors.

Real Python avatar
Real Python@realpython·3h

3. Grover's algorithm searches an unsorted list of N items in about √N steps. A classical search needs about N. On paper, a million items takes on the order of a thousand Grover steps instead of a million. That assumes a quantum computer big and reliable enough to run it.

Real Python avatar
Real Python@realpython·3h

2. A qubit in superposition has no definite value until you measure it. Measuring forces it to 0 or 1 and destroys the superposition. That's why you run a quantum circuit thousands of times and estimate the probabilities from how often each result comes up.

Real Python avatar
Real Python@realpython·3h

1. Shor's algorithm factors numbers by finding a repeating pattern. Take powers of 7 and keep the remainder after dividing by 15: 7, 4, 13, 1, 7, 4, 13, 1 The period, 4, gives you the factors 3 and 5. Factoring a 617-digit number would take classical methods astronomical time.

Post attachment
Real Python avatar
Real Python@realpython·3h

You can follow the core ideas of quantum computing without a physics degree, and try two of them in Python: 1. The pattern behind Shor's algorithm 2. Why you can't peek at a qubit 3. Search in √N steps 4. Why quantum advantage isn't here yet 5. Your first Qiskit circuit 🧵

Real Python avatar
Real Python@realpython·5h

Announcing Great Tables v1.0 & v1.1 for #Python, Pandas, and Polars users! Now featuring multi-column stubs, value-based conditional styling, decimal alignment, and specialized formatters for chemical formulas, fractions, and links. #sponsored realpython.com/social/link/b…

Real Python avatar
Real Python@realpython·6h

🖼️ Kuaishou's Kling Image 4.0 with native 8K Native 8K images, up to 10 per prompt, and available by API.

Real Python avatar
Real Python@realpython·6h

🎨 Microsoft's MAI Image 2.7 image models In public preview on Microsoft Foundry, at about $35 per 1,000 images ($10 for Flash).