From 08aa3cb140e578c6536faab22532381364cf2fd8 Mon Sep 17 00:00:00 2001 From: Doug Strain Date: Mon, 4 Sep 2023 18:55:32 -0700 Subject: [PATCH 1/3] Create physics_terms.md Create a table that maps physics terms to cirq to unitary. --- docs/alpha/physics_terms.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/alpha/physics_terms.md diff --git a/docs/alpha/physics_terms.md b/docs/alpha/physics_terms.md new file mode 100644 index 00000000..bb623502 --- /dev/null +++ b/docs/alpha/physics_terms.md @@ -0,0 +1,22 @@ +# Unitary for Physicists + +If you are already familiar with quantum computing terms, have used cirq, or come from a physics background, +the terms in the Unitary may feel a bit unfamiliar. They are meant to connect quantum concepts to traditional +programming contructs, such as "if/then". + +The following is a table that connects physics terms to cirq and unitary terms. + +| Physics | Cirq | Unitary | +| -------- | ------- | ----- | +| Qubit | cirq.Qid | alpha.QuantumObject | +| Qubtrit | cirq.Qid | alpha.QuantumObject (using an enum with three values) | +| Quantum circuit | cirq.Circuit | alpha.QuantumWorld | +| Generic Unitary | cirq.Gate | alpha.QuantumEffect | +| Gate applied to specified qubits | cirq.Operation | QuantumEffect(qubits) | +| X gate | cirq.X | alpha.Flip() | +| $\sqrt{X}$ or square root of NOT | cirq.X ** 0.5 | alpha.Flip(effect_fraction=0.5) | +| Z gate | cirq.Z | alpha.Phase() | +| Hadamard | cirq.H | alpha.Superposition() | +| Controlled-gate | gate.controlled_by() | alpha.quantum_if() | +| CNOT | cirq.CNOT(a,b) | alpha.quantum_if(a).then_apply(alpha.Flip())(b) | +| CZ | cirq.CZ(a,b) | alpha.quantum_if(a).then_apply(alpha.Phase())(b) | From c8c82a1cf38ac1c4948d31fed98529d3935b873f Mon Sep 17 00:00:00 2001 From: Chris Cantwell Date: Tue, 5 Sep 2023 08:33:57 -0700 Subject: [PATCH 2/3] Update physics_terms.md fixed typo and alpha. consistency --- docs/alpha/physics_terms.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/alpha/physics_terms.md b/docs/alpha/physics_terms.md index bb623502..9bc27e03 100644 --- a/docs/alpha/physics_terms.md +++ b/docs/alpha/physics_terms.md @@ -9,10 +9,10 @@ The following is a table that connects physics terms to cirq and unitary terms. | Physics | Cirq | Unitary | | -------- | ------- | ----- | | Qubit | cirq.Qid | alpha.QuantumObject | -| Qubtrit | cirq.Qid | alpha.QuantumObject (using an enum with three values) | +| Qutrit | cirq.Qid | alpha.QuantumObject (using an enum with three values) | | Quantum circuit | cirq.Circuit | alpha.QuantumWorld | | Generic Unitary | cirq.Gate | alpha.QuantumEffect | -| Gate applied to specified qubits | cirq.Operation | QuantumEffect(qubits) | +| Gate applied to specified qubits | cirq.Operation | alpha.QuantumEffect(qubits) | | X gate | cirq.X | alpha.Flip() | | $\sqrt{X}$ or square root of NOT | cirq.X ** 0.5 | alpha.Flip(effect_fraction=0.5) | | Z gate | cirq.Z | alpha.Phase() | From bd0b9e0731329a07594cc74e84f1ab9f45d98c36 Mon Sep 17 00:00:00 2001 From: Doug Strain Date: Fri, 8 Sep 2023 04:07:16 -0700 Subject: [PATCH 3/3] Rename physics_terms.md to physics_terms.md --- docs/{alpha => unitary}/physics_terms.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{alpha => unitary}/physics_terms.md (100%) diff --git a/docs/alpha/physics_terms.md b/docs/unitary/physics_terms.md similarity index 100% rename from docs/alpha/physics_terms.md rename to docs/unitary/physics_terms.md