58 lines
2.8 KiB
Plaintext
58 lines
2.8 KiB
Plaintext
---
|
||
title: synth_stabilizer_layers
|
||
description: API reference for qiskit.synthesis.synth_stabilizer_layers
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: function
|
||
python_api_name: qiskit.synthesis.synth_stabilizer_layers
|
||
---
|
||
|
||
<span id="qiskit-synthesis-synth-stabilizer-layers" />
|
||
|
||
# qiskit.synthesis.synth\_stabilizer\_layers
|
||
|
||
<Function id="qiskit.synthesis.synth_stabilizer_layers" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/synthesis/stabilizer/stabilizer_decompose.py" signature="synth_stabilizer_layers(stab, cz_synth_func=<function _default_cz_synth_func>, cz_func_reverse_qubits=False, validate=False)">
|
||
Synthesis of a stabilizer state into layers.
|
||
|
||
It provides a similar decomposition to the synthesis described in Lemma 8 of Bravyi and Maslov, without the initial Hadamard-free sub-circuit which do not affect the stabilizer state.
|
||
|
||
For example, a 5-qubit stabilizer state is decomposed into the following layers:
|
||
|
||
```python
|
||
┌─────┐┌─────┐┌─────┐┌─────┐┌────────┐
|
||
q_0: ┤0 ├┤0 ├┤0 ├┤0 ├┤0 ├
|
||
│ ││ ││ ││ ││ │
|
||
q_1: ┤1 ├┤1 ├┤1 ├┤1 ├┤1 ├
|
||
│ ││ ││ ││ ││ │
|
||
q_2: ┤2 H2 ├┤2 S1 ├┤2 CZ ├┤2 H1 ├┤2 Pauli ├
|
||
│ ││ ││ ││ ││ │
|
||
q_3: ┤3 ├┤3 ├┤3 ├┤3 ├┤3 ├
|
||
│ ││ ││ ││ ││ │
|
||
q_4: ┤4 ├┤4 ├┤4 ├┤4 ├┤4 ├
|
||
└─────┘└─────┘└─────┘└─────┘└────────┘
|
||
```
|
||
|
||
**Parameters**
|
||
|
||
* **stab** ([*StabilizerState*](qiskit.quantum_info.StabilizerState "qiskit.quantum_info.StabilizerState")) – a stabilizer state.
|
||
* **cz\_synth\_func** (*Callable*) – a function to decompose the CZ sub-circuit. It gets as input a boolean symmetric matrix, and outputs a QuantumCircuit.
|
||
* **validate** (*Boolean*) – if True, validates the synthesis process.
|
||
* **cz\_func\_reverse\_qubits** (*Boolean*) – True only if cz\_synth\_func is synth\_cz\_depth\_line\_mr, since this function returns a circuit that reverts the order of qubits.
|
||
|
||
**Returns**
|
||
|
||
a circuit implementation of the stabilizer state.
|
||
|
||
**Return type**
|
||
|
||
[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
|
||
|
||
**Raises**
|
||
|
||
**QiskitError** – if the input is not a StabilizerState.
|
||
|
||
## Reference:
|
||
|
||
1. S. Bravyi, D. Maslov, *Hadamard-free circuits expose the structure of the Clifford group*, [arXiv:2003.09412 \[quant-ph\]](https://arxiv.org/abs/2003.09412)
|
||
</Function>
|
||
|