Skip to content

Uniform Distribution State Preparation

The UniformDistributionStatePreparation function creates a state with equal probabilities on all computational states.

Syntax

Function: UniformDistributionStatePreparation

Parameters:

  • num_qubits: int
{
  "functions": [
    {
      "name": "main",
      "body": [
        {
          "function": "UniformDistributionStatePreparation",
          "function_params": {
              "num_qubits": 5
          }
        }
      ]
    }
  ]
}
from classiq import Model
from classiq.builtin_functions import UniformDistributionStatePreparation

model = Model()
params = UniformDistributionStatePreparation(num_qubits=5)
model.UniformDistributionStatePreparation(params)