Zum Inhalt
HALOWERK

Quantumwerk

circuit optimize

Cancels adjacent identical self-inverse gates on identical ordered targets and folds adjacent RX, RY or RZ rotations on identical targets. It preserves only these local identities; it does not commute gates, model hardware topology, synthesize arbitrary unitaries or prove global optimality.

POST https://quantum.halowerk.com/v1/circuit-optimize

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
qubit_countintegerJa
gatesarrayJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "qubit_count",
    "gates"
  ],
  "additionalProperties": false,
  "properties": {
    "qubit_count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 128
    },
    "gates": {
      "type": "array",
      "minItems": 1,
      "maxItems": 10000,
      "items": {
        "type": "object",
        "required": [
          "gate",
          "targets"
        ],
        "additionalProperties": false,
        "properties": {
          "gate": {
            "type": "string",
            "enum": [
              "X",
              "Y",
              "Z",
              "H",
              "CNOT",
              "CZ",
              "SWAP",
              "RX",
              "RY",
              "RZ"
            ]
          },
          "targets": {
            "type": "array",
            "minItems": 1,
            "maxItems": 2,
            "uniqueItems": true,
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 127
            }
          },
          "angle_rad": {
            "type": "number",
            "minimum": -1000000,
            "maximum": 1000000
          }
        }
      }
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "qubit_count": 3,
  "gates": [
    {
      "gate": "H",
      "targets": [
        0
      ]
    },
    {
      "gate": "H",
      "targets": [
        0
      ]
    },
    {
      "gate": "RZ",
      "targets": [
        1
      ],
      "angle_rad": 0.4
    },
    {
      "gate": "RZ",
      "targets": [
        1
      ],
      "angle_rad": -0.1
    },
    {
      "gate": "CNOT",
      "targets": [
        0,
        2
      ]
    }
  ]
}

Ergebnis & Dokumentation

Veröffentlichtes Ergebnisschema anzeigen
{
  "$ref": "https://quantum.halowerk.com/v1/circuit-optimize/schema#/outputSchema"
}

Veröffentlichtes Ergebnisbeispiel öffnen

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →