iwtlp.com

Quantum computing basics in Python, without the hype (opens in new tab)

Covered by DEV CommunityDiscussed on DEV

Quantum computing is buried under hype, but the basics are concrete: a qubit is a vector, a gate is a matrix, and you can simulate small quantum circuits in plain Python with NumPy. You do not need a quantum computer to understand how one works. A qubit is a vector A classical bit is 0 or 1. A qubit is a combination of both, written as a 2-element vector of amplitudes: import numpy as np zero = np.array([1, 0]) # |0> one = np.array([0, 1]) # |1> # a superposition: equal parts |0> and |1> plus...

Read the original article
Sign in to keep reading the full article.

Covered in 1 article

DEV Community·
Discussed on DEV
Feeds

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help