Skip to content

Bell State Preparation

The BellStatePreparation function creates one of the four Bell states

\[ \phi_{+} = \frac{1}{2} \left(|00\rangle + |11\rangle \right) \]
\[ \phi_{-} = \frac{1}{2} \left(|00\rangle - |11\rangle \right) \]
\[ \psi_{+} = \frac{1}{2} \left(|01\rangle + |10\rangle \right) \]
\[ \psi_{-} = \frac{1}{2} \left(|01\rangle - |10\rangle \right) \]

Syntax

Function: BellStatePreparation

Parameters:

  • name: ["phi+", "phi-", "psi+", "psi-"]
{
  "functions": [
    {
      "name": "main",
      "body": [
        {
          "function": "BellStatePreparation",
          "function_params": {
              "name": "phi-"
          }
        }
      ]
    }
  ]
}
from classiq import Model
from classiq.builtin_functions import BellStatePreparation

model = Model()
params = BellStatePreparation(name="phi-")
model.BellStatePreparation(params)