qiskit-documentation/docs/api/qiskit/0.41/qiskit.synthesis.synth_clif...

51 lines
3.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: synth_clifford_layers
description: API reference for qiskit.synthesis.synth_clifford_layers
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.synthesis.synth_clifford_layers
---
# qiskit.synthesis.synth\_clifford\_layers
<Function id="qiskit.synthesis.synth_clifford_layers" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.23/qiskit/synthesis/clifford/clifford_decompose_layers.py" signature="synth_clifford_layers(cliff, cx_synth_func=<function _default_cx_synth_func>, cz_synth_func=<function _default_cz_synth_func>, cx_cz_synth_func=None, validate=False)">
Synthesis of a Clifford into layers, it provides a similar decomposition to the synthesis described in Lemma 8 of \[1].
For example, a 5-qubit Clifford circuit is decomposed into the following layers:
```python
┌─────┐┌─────┐┌────────┐┌─────┐┌─────┐┌─────┐┌─────┐┌────────┐
q_0: ┤0 ├┤0 ├┤0 ├┤0 ├┤0 ├┤0 ├┤0 ├┤0 ├
│ ││ ││ ││ ││ ││ ││ ││ │
q_1: ┤1 ├┤1 ├┤1 ├┤1 ├┤1 ├┤1 ├┤1 ├┤1 ├
│ ││ ││ ││ ││ ││ ││ ││ │
q_2: ┤2 S2 ├┤2 CZ ├┤2 CX_dg ├┤2 H2 ├┤2 S1 ├┤2 CZ ├┤2 H1 ├┤2 Pauli ├
│ ││ ││ ││ ││ ││ ││ ││ │
q_3: ┤3 ├┤3 ├┤3 ├┤3 ├┤3 ├┤3 ├┤3 ├┤3 ├
│ ││ ││ ││ ││ ││ ││ ││ │
q_4: ┤4 ├┤4 ├┤4 ├┤4 ├┤4 ├┤4 ├┤4 ├┤4 ├
└─────┘└─────┘└────────┘└─────┘└─────┘└─────┘└─────┘└────────┘
```
**Parameters**
* **cliff** ([*Clifford*](qiskit.quantum_info.Clifford "qiskit.quantum_info.Clifford")) a clifford operator.
* **cx\_synth\_func** (*Callable*) a function to decompose the CX sub-circuit.
* **cz\_synth\_func** (*Callable*) a function to decompose the CZ sub-circuit.
* **cx\_cz\_synth\_func** (*Callable*) optional, a function to decompose both sub-circuits CZ and CX.
* **validate** (*Boolean*) if True, validates the synthesis process.
**Returns**
a circuit implementation of the Clifford.
**Return type**
[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
## 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>