The Wayback Machine - https://web.archive.org/web/20200522044136/https://github.com/topics/qubits
Skip to content
#

qubits

Here are 30 public repositories matching this topic...

bortzmeyer
bortzmeyer commented Jun 27, 2018

README.md says (example "Pure python quantum computing machinery"):

qc.measure("q1")
qc.measure("q2")
Probability.pretty_print_probabilities(qc.qubits.get_quantum_register_containing("q1").get_state())

If you do so, the last line always output:

|psi>=|00>
Pr(|00>)=1.000000; 
<state>=1.000000

Because measurement destroyed the state. IMHO, it should be get_noop in

perak
perak commented Jun 11, 2019

Good example is teleportation circuit:

QASM:

OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
creg c0[1];
creg c1[1];
rx (pi/4) q[0];
h q[1];
cx q[1], q[2];
cx q[0], q[1];
h q[0];
measure q[1] -> c1[0];
if(c1==1) x q[2];
measure q[0] -> c0[0];
if(c0==1) z q[2];

When exported to Cirq, code currently looks like this:

import cirq
import numpy as np

q = 

Improve this page

Add a description, image, and links to the qubits topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the qubits topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.