4 ms·
I've wondered for a long time what the user experience for quantum computing will look like. I had imagined some library with a type for "qbit" and an dsl for m
by __MatrixMan__ 2y ago
I've wondered for a long time what the user experience for quantum computing will look like. I had imagined some library with a type for "qbit" and an dsl for making them interact in certain ways and then some kind of async thing where your classical code could run locally while periodically shuttling data to and from wherever the quantum computer is.
This isn't quite that but I guess it's a first step.
- inurqubits 2y agoThey already exist import numpy as np from qiskit import QuantumCircuit # 1. A quantum circuit for preparing the quantum state |000> + i |111> / √2 qc = QuantumCircuit(3) # generate superposition qc.h(0) # add quantum phase qc.p(np.pi / 2, 0) # 0th-qubit-Controlled-NOT gate on 1st qubit qc.cx(0, 1) # 0th-qubit-Controlled-NOT gate on 2nd qubit qc.cx(0, 2)
- __MatrixMan__ 2y agoThanks for the pointer to qiskit, I'm gonna go learn...