Documentation

LeanPool.LeanQuantumAlg.Algorithms.GHZ

GHZ state preparation #

The three-qubit GHZ state (|000⟩ + |111⟩)/√2, prepared from |000⟩ by a Hadamard on qubit 0 followed by a CNOT cascade:

(I ⊗ CNOT) · (CNOT ⊗ I) · (H ⊗ I ⊗ I) · |000⟩ = (|000⟩ + |111⟩)/√2.

States of this multipartite family are due to Greenberger, Horne and Zeilinger (1989), whose original argument uses a four-particle spin state (reprinted as arXiv:0712.0921). The three-qubit form and the name "GHZ state" are standard textbook material (e.g. Nielsen and Chuang 2000). In [dW19] the unnormalized states |000⟩ ± |111⟩ appear as the code blocks of Shor's 9-qubit code [dW19, qcnotes.tex:7456], and a locally-equivalent three-qubit state powers Mermin's game [dW19, qcnotes.tex:6667].

Conventions #

Main results #

noncomputable def QuantumAlg.ghzVec :

The three-qubit GHZ state (|000⟩ + |111⟩)/√2 (Greenberger, Horne and Zeilinger 1989; three-qubit form standard, e.g. Nielsen and Chuang 2000). In the big-endian basis labelling, |000⟩ = ket 0 and |111⟩ = ket 7.

Equations
Instances For

    The raw GHZ vector has unit norm.

    noncomputable def QuantumAlg.ghz :

    The normalized GHZ state.

    Equations
    Instances For
      noncomputable def QuantumAlg.ghzCircuit :

      The GHZ preparation circuit: a Hadamard on qubit 0, a CNOT with control 0 and target 1, then a CNOT with control 1 and target 2 — (I ⊗ CNOT) · (CNOT ⊗ I) · (H ⊗ I ⊗ I).

      Equations
      Instances For

        GHZ state preparation: the cascade circuit turns |000⟩ into the GHZ state, extending Bell-state preparation (bell_state_prep) by one CNOT.

        @[simp]

        The GHZ state is normalized.