qiskit-documentation/docs/api/qiskit/0.43/qiskit.synthesis.synth_cz_d...

35 lines
1.4 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_cz_depth_line_mr
description: API reference for qiskit.synthesis.synth_cz_depth_line_mr
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.synthesis.synth_cz_depth_line_mr
---
<span id="qiskit-synthesis-synth-cz-depth-line-mr" />
# qiskit.synthesis.synth\_cz\_depth\_line\_mr
<Function id="qiskit.synthesis.synth_cz_depth_line_mr" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/synthesis/linear_phase/cz_depth_lnn.py" signature="synth_cz_depth_line_mr(mat)">
Synthesis of a CZ circuit for linear nearest neighbour (LNN) connectivity, based on Maslov and Roetteler.
Note that this method *reverts* the order of qubits in the circuit, and returns a circuit containing CX and phase (S, Sdg or Z) gates.
**Parameters**
**mat** ([*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v1.25)")) an upper-diagonal matrix representing the CZ circuit. mat\[i]\[j]=1 for i\<j represents a CZ(i,j) gate
**Returns**
a circuit implementation of the CZ circuit of depth 2\*n+2 for LNN connectivity.
**Return type**
[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
## Reference:
1. Dmitri Maslov, Martin Roetteler, *Shorter stabilizer circuits via Bruhat decomposition and quantum circuit transformations*, [arXiv:1705.09176](https://arxiv.org/abs/1705.09176).
</Function>