Quantum Information (qiskit.quantum_info)#

Operators#

Operator(data[, input_dims, output_dims])

Matrix operator class

Pauli([data, x, z, label])

N-qubit Pauli operator.

Clifford(data[, validate, copy])

An N-qubit unitary operator from the Clifford group.

ScalarOp([dims, coeff])

Scalar identity operator class.

SparsePauliOp(data[, coeffs, ...])

Sparse N-qubit operator in a Pauli basis representation.

CNOTDihedral([data, num_qubits, validate])

An N-qubit operator from the CNOT-Dihedral group.

PauliList(data)

List of N-qubit Pauli operators.

PauliTable(data)

DEPRECATED: Symplectic representation of a list Pauli matrices.

StabilizerTable(data[, phase])

DEPRECATED: Symplectic representation of a list Stabilizer matrices.

pauli_basis(num_qubits[, weight, pauli_list])

Return the ordered PauliTable or PauliList for the n-qubit Pauli basis.

States#

Statevector(data[, dims])

Statevector class

DensityMatrix(data[, dims])

DensityMatrix class

StabilizerState(data[, validate])

StabilizerState class.

Channels#

Choi(data[, input_dims, output_dims])

Choi-matrix representation of a Quantum Channel.

SuperOp(data[, input_dims, output_dims])

Superoperator representation of a quantum channel.

Kraus(data[, input_dims, output_dims])

Kraus representation of a quantum channel.

Stinespring(data[, input_dims, output_dims])

Stinespring representation of a quantum channel.

Chi(data[, input_dims, output_dims])

Pauli basis Chi-matrix representation of a quantum channel.

PTM(data[, input_dims, output_dims])

Pauli Transfer Matrix (PTM) representation of a Quantum Channel.

Measures#

qiskit.quantum_info.average_gate_fidelity(channel, target=None, require_cp=True, require_tp=False)[ソース]#

Return the average gate fidelity of a noisy quantum channel.

The average gate fidelity \(F_{\text{ave}}\) is given by

\[\begin{split}F_{\text{ave}}(\mathcal{E}, U) &= \int d\psi \langle\psi|U^\dagger \mathcal{E}(|\psi\rangle\!\langle\psi|)U|\psi\rangle \\ &= \frac{d F_{\text{pro}}(\mathcal{E}, U) + 1}{d + 1}\end{split}\]

where \(F_{\text{pro}}(\mathcal{E}, U)\) is the process_fidelity() of the input quantum channel \(\mathcal{E}\) with a target unitary \(U\), and \(d\) is the dimension of the channel.

パラメータ:
  • channel (QuantumChannel or Operator) – noisy quantum channel.

  • target (Operator or None) – target unitary operator. If None target is the identity operator [Default: None].

  • require_cp (bool) – check if input and target channels are completely-positive and if non-CP log warning containing negative eigenvalues of Choi-matrix [Default: True].

  • require_tp (bool) – check if input and target channels are trace-preserving and if non-TP log warning containing negative eigenvalues of partial Choi-matrix \(Tr_{\mbox{out}}[\mathcal{E}] - I\) [Default: True].

戻り値:

The average gate fidelity \(F_{\text{ave}}\).

戻り値の型:

float

例外:

QiskitError – if the channel and target do not have the same dimensions, or have different input and output dimensions.

qiskit.quantum_info.process_fidelity(channel, target=None, require_cp=True, require_tp=True)[ソース]#

Return the process fidelity of a noisy quantum channel.

The process fidelity \(F_{\text{pro}}(\mathcal{E}, \mathcal{F})\) between two quantum channels \(\mathcal{E}, \mathcal{F}\) is given by

\[F_{\text{pro}}(\mathcal{E}, \mathcal{F}) = F(\rho_{\mathcal{E}}, \rho_{\mathcal{F}})\]

where \(F\) is the state_fidelity(), \(\rho_{\mathcal{E}} = \Lambda_{\mathcal{E}} / d\) is the normalized Choi matrix for the channel \(\mathcal{E}\), and \(d\) is the input dimension of \(\mathcal{E}\).

When the target channel is unitary this is equivalent to

\[F_{\text{pro}}(\mathcal{E}, U) = \frac{Tr[S_U^\dagger S_{\mathcal{E}}]}{d^2}\]

where \(S_{\mathcal{E}}, S_{U}\) are the SuperOp matrices for the input quantum channel \(\mathcal{E}\) and target unitary \(U\) respectively, and \(d\) is the input dimension of the channel.

パラメータ:
  • channel (Operator or QuantumChannel) – input quantum channel.

  • target (Operator or QuantumChannel or None) – target quantum channel. If None target is the identity operator [Default: None].

  • require_cp (bool) – check if input and target channels are completely-positive and if non-CP log warning containing negative eigenvalues of Choi-matrix [Default: True].

  • require_tp (bool) – check if input and target channels are trace-preserving and if non-TP log warning containing negative eigenvalues of partial Choi-matrix \(Tr_{\mbox{out}}[\mathcal{E}] - I\) [Default: True].

戻り値:

The process fidelity \(F_{\text{pro}}\).

戻り値の型:

float

例外:

QiskitError – if the channel and target do not have the same dimensions.

qiskit.quantum_info.gate_error(channel, target=None, require_cp=True, require_tp=False)[ソース]#

Return the gate error of a noisy quantum channel.

The gate error \(E\) is given by the average gate infidelity

\[E(\mathcal{E}, U) = 1 - F_{\text{ave}}(\mathcal{E}, U)\]

where \(F_{\text{ave}}(\mathcal{E}, U)\) is the average_gate_fidelity() of the input quantum channel \(\mathcal{E}\) with a target unitary \(U\).

パラメータ:
  • channel (QuantumChannel) – noisy quantum channel.

  • target (Operator or None) – target unitary operator. If None target is the identity operator [Default: None].

  • require_cp (bool) – check if input and target channels are completely-positive and if non-CP log warning containing negative eigenvalues of Choi-matrix [Default: True].

  • require_tp (bool) – check if input and target channels are trace-preserving and if non-TP log warning containing negative eigenvalues of partial Choi-matrix \(Tr_{\mbox{out}}[\mathcal{E}] - I\) [Default: True].

戻り値:

The average gate error \(E\).

戻り値の型:

float

例外:

QiskitError – if the channel and target do not have the same dimensions, or have different input and output dimensions.

qiskit.quantum_info.diamond_norm(choi, solver='SCS', **kwargs)[ソース]#

Return the diamond norm of the input quantum channel object.

This function computes the completely-bounded trace-norm (often referred to as the diamond-norm) of the input quantum channel object using the semidefinite-program from reference [1].

パラメータ:
  • choi (Choi or QuantumChannel) – a quantum channel object or Choi-matrix array.

  • solver (str) – The solver to use.

  • kwargs – optional arguments to pass to CVXPY solver.

戻り値:

The completely-bounded trace norm \(\|\mathcal{E}\|_{\diamond}\).

戻り値の型:

float

例外:

QiskitError – if CVXPY package cannot be found.

Additional Information:

The input to this function is typically not a CPTP quantum channel, but rather the difference between two quantum channels \(\|\Delta\mathcal{E}\|_\diamond\) where \(\Delta\mathcal{E} = \mathcal{E}_1 - \mathcal{E}_2\).

Reference:

J. Watrous. 「Simpler semidefinite programs for completely bounded norms」, arXiv:1207.5726 [quant-ph] (2012).

注釈

This function requires the optional CVXPY package to be installed. Any additional kwargs will be passed to the cvxpy.solve function. See the CVXPY documentation for information on available SDP solvers.

qiskit.quantum_info.state_fidelity(state1, state2, validate=True)[ソース]#

Return the state fidelity between two quantum states.

The state fidelity \(F\) for density matrix input states \(\rho_1, \rho_2\) is given by

\[F(\rho_1, \rho_2) = Tr[\sqrt{\sqrt{\rho_1}\rho_2\sqrt{\rho_1}}]^2.\]

If one of the states is a pure state this simplifies to \(F(\rho_1, \rho_2) = \langle\psi_1|\rho_2|\psi_1\rangle\), where \(\rho_1 = |\psi_1\rangle\!\langle\psi_1|\).

パラメータ:
戻り値:

The state fidelity \(F(\rho_1, \rho_2)\).

戻り値の型:

float

例外:

QiskitError – if validate=True and the inputs are invalid quantum states.

qiskit.quantum_info.purity(state, validate=True)[ソース]#

Calculate the purity of a quantum state.

The purity of a density matrix \(\rho\) is

\[\text{Purity}(\rho) = Tr[\rho^2]\]
パラメータ:
戻り値:

the purity \(Tr[\rho^2]\).

戻り値の型:

float

例外:

QiskitError – if the input isn’t a valid quantum state.

qiskit.quantum_info.concurrence(state)[ソース]#

Calculate the concurrence of a quantum state.

The concurrence of a bipartite Statevector \(|\psi\rangle\) is given by

\[C(|\psi\rangle) = \sqrt{2(1 - Tr[\rho_0^2])}\]

where \(\rho_0 = Tr_1[|\psi\rangle\!\langle\psi|]\) is the reduced state from by taking the partial_trace() of the input state.

For density matrices the concurrence is only defined for 2-qubit states, it is given by:

\[C(\rho) = \max(0, \lambda_1 - \lambda_2 - \lambda_3 - \lambda_4)\]

where \(\lambda _1 \ge \lambda _2 \ge \lambda _3 \ge \lambda _4\) are the ordered eigenvalues of the matrix \(R=\sqrt{\sqrt{\rho }(Y\otimes Y)\overline{\rho}(Y\otimes Y)\sqrt{\rho}}\).

パラメータ:

state (Statevector or DensityMatrix) – a 2-qubit quantum state.

戻り値:

The concurrence.

戻り値の型:

float

例外:
  • QiskitError – if the input state is not a valid QuantumState.

  • QiskitError – if input is not a bipartite QuantumState.

  • QiskitError – if density matrix input is not a 2-qubit state.

qiskit.quantum_info.entropy(state, base=2)[ソース]#

Calculate the von-Neumann entropy of a quantum state.

The entropy \(S\) is given by

\[S(\rho) = - Tr[\rho \log(\rho)]\]
パラメータ:
戻り値:

The von-Neumann entropy S(rho).

戻り値の型:

float

例外:

QiskitError – if the input state is not a valid QuantumState.

qiskit.quantum_info.entanglement_of_formation(state)[ソース]#

Calculate the entanglement of formation of quantum state.

The input quantum state must be either a bipartite state vector, or a 2-qubit density matrix.

パラメータ:

state (Statevector or DensityMatrix) – a 2-qubit quantum state.

戻り値:

The entanglement of formation.

戻り値の型:

float

例外:
  • QiskitError – if the input state is not a valid QuantumState.

  • QiskitError – if input is not a bipartite QuantumState.

  • QiskitError – if density matrix input is not a 2-qubit state.

qiskit.quantum_info.mutual_information(state, base=2)[ソース]#

Calculate the mutual information of a bipartite state.

The mutual information \(I\) is given by:

\[I(\rho_{AB}) = S(\rho_A) + S(\rho_B) - S(\rho_{AB})\]

where \(\rho_A=Tr_B[\rho_{AB}], \rho_B=Tr_A[\rho_{AB}]\), are the reduced density matrices of the bipartite state \(\rho_{AB}\).

パラメータ:
戻り値:

The mutual information \(I(\rho_{AB})\).

戻り値の型:

float

例外:
  • QiskitError – if the input state is not a valid QuantumState.

  • QiskitError – if input is not a bipartite QuantumState.

Utility Functions#

qiskit.quantum_info.negativity(state, qargs)[ソース]#

Calculates the negativity.

The mathematical expression for negativity is given by:

\[{\cal{N}}(\rho) = \frac{|| \rho^{T_A}|| - 1 }{2}\]
パラメータ:
戻り値:

Negativity value of the quantum state

戻り値の型:

float

例外:

QiskitError – if the input state is not a valid QuantumState.

qiskit.quantum_info.partial_trace(state, qargs)[ソース]#

Return reduced density matrix by tracing out part of quantum state.

If all subsystems are traced over this returns the trace() of the input state.

パラメータ:
戻り値:

The reduced density matrix.

戻り値の型:

DensityMatrix

例外:

QiskitError – if input state is invalid.

qiskit.quantum_info.schmidt_decomposition(state, qargs)[ソース]#

Return the Schmidt Decomposition of a pure quantum state.

For an arbitrary bipartite state:

\[|\psi\rangle_{AB} = \sum_{i,j} c_{ij} |x_i\rangle_A \otimes |y_j\rangle_B,\]

its Schmidt Decomposition is given by the single-index sum over k:

\[|\psi\rangle_{AB} = \sum_{k} \lambda_{k} |u_k\rangle_A \otimes |v_k\rangle_B\]

where \(|u_k\rangle_A\) and \(|v_k\rangle_B\) are an orthonormal set of vectors in their respective spaces \(A\) and \(B\), and the Schmidt coefficients \(\lambda_k\) are positive real values.

パラメータ:
  • state (Statevector or DensityMatrix) – the input state.

  • qargs (list) – the list of Input state positions corresponding to subsystem \(B\).

戻り値:

list of tuples (s, u, v), where s (float) are the Schmidt coefficients \(\lambda_k\), and u (Statevector), v (Statevector) are the Schmidt vectors \(|u_k\rangle_A\), \(|u_k\rangle_B\), respectively.

戻り値の型:

list

例外:
  • QiskitError – if Input qargs is not a list of positions of the Input state.

  • QiskitError – if Input qargs is not a proper subset of Input state.

注釈

In Qiskit, qubits are ordered using little-endian notation, with the least significant qubits having smaller indices. For example, a four-qubit system is represented as \(|q_3q_2q_1q_0\rangle\). Using this convention, setting qargs=[0] will partition the state as \(|q_3q_2q_1\rangle_A\otimes|q_0\rangle_B\). Furthermore, qubits will be organized in this notation regardless of the order they are passed. For instance, passing either qargs=[1,2] or qargs=[2,1] will result in partitioning the state as \(|q_3q_0\rangle_A\otimes|q_2q_1\rangle_B\).

qiskit.quantum_info.shannon_entropy(pvec, base=2)[ソース]#

Compute the Shannon entropy of a probability vector.

The shannon entropy of a probability vector \(\vec{p} = [p_0, ..., p_{n-1}]\) is defined as

\[H(\vec{p}) = \sum_{i=0}^{n-1} p_i \log_b(p_i)\]

where \(b\) is the log base and (default 2), and \(0 \log_b(0) \equiv 0\).

パラメータ:
  • pvec (array_like) – a probability vector.

  • base (int) – the base of the logarithm [Default: 2].

戻り値:

The Shannon entropy H(pvec).

戻り値の型:

float

qiskit.quantum_info.commutator(a, b)[ソース]#

Compute commutator of a and b.

\[ab - ba.\]
パラメータ:
  • a (OperatorTypeT) – Operator a.

  • b (OperatorTypeT) – Operator b.

戻り値:

The commutator

戻り値の型:

OperatorTypeT

qiskit.quantum_info.anti_commutator(a, b)[ソース]#

Compute anti-commutator of a and b.

\[ab + ba.\]
パラメータ:
  • a (OperatorTypeT) – Operator a.

  • b (OperatorTypeT) – Operator b.

戻り値:

The anti-commutator

戻り値の型:

OperatorTypeT

qiskit.quantum_info.double_commutator(a, b, c, *, commutator=True)[ソース]#

Compute symmetric double commutator of a, b and c.

See also Equation (13.6.18) in [1].

If commutator is True, it returns

\[[[A, B], C]/2 + [A, [B, C]]/2 = (2ABC + 2CBA - BAC - CAB - ACB - BCA)/2.\]

If commutator is False, it returns

\[\lbrace[A, B], C\rbrace/2 + \lbrace A, [B, C]\rbrace/2 = (2ABC - 2CBA - BAC + CAB - ACB + BCA)/2.\]
パラメータ:
  • a (OperatorTypeT) – Operator a.

  • b (OperatorTypeT) – Operator b.

  • c (OperatorTypeT) – Operator c.

  • commutator (bool) – If True compute the double commutator, if False the double anti-commutator.

戻り値:

The double commutator

戻り値の型:

OperatorTypeT

参照

[1]: R. McWeeny.

Methods of Molecular Quantum Mechanics. 2nd Edition, Academic Press, 1992. ISBN 0-12-486552-6.

Random#

qiskit.quantum_info.random_statevector(dims, seed=None)[ソース]#

Generator a random Statevector.

The statevector is sampled from the uniform (Haar) measure.

パラメータ:
  • dims (int or tuple) – the dimensions of the state.

  • seed (int or np.random.Generator) – Optional. Set a fixed seed or generator for RNG.

戻り値:

the random statevector.

戻り値の型:

Statevector

qiskit.quantum_info.random_density_matrix(dims, rank=None, method='Hilbert-Schmidt', seed=None)[ソース]#

Generator a random DensityMatrix.

パラメータ:
  • dims (int or tuple) – the dimensions of the DensityMatrix.

  • rank (int or None) – Optional, the rank of the density matrix. The default value is full-rank.

  • method (string) – Optional. The method to use. 『Hilbert-Schmidt』: (Default) sample from the Hilbert-Schmidt metric. 『Bures』: sample from the Bures metric.

  • seed (int or np.random.Generator) – Optional. Set a fixed seed or generator for RNG.

戻り値:

the random density matrix.

戻り値の型:

DensityMatrix

例外:

QiskitError – if the method is not valid.

qiskit.quantum_info.random_unitary(dims, seed=None)[ソース]#

Return a random unitary Operator.

The operator is sampled from the unitary Haar measure.

パラメータ:
  • dims (int or tuple) – the input dimensions of the Operator.

  • seed (int or np.random.Generator) – Optional. Set a fixed seed or generator for RNG.

戻り値:

a unitary operator.

戻り値の型:

Operator

qiskit.quantum_info.random_hermitian(dims, traceless=False, seed=None)[ソース]#

Return a random hermitian Operator.

The operator is sampled from Gaussian Unitary Ensemble.

パラメータ:
  • dims (int or tuple) – the input dimension of the Operator.

  • traceless (bool) – Optional. If True subtract diagonal entries to return a traceless hermitian operator (Default: False).

  • seed (int or np.random.Generator) – Optional. Set a fixed seed or generator for RNG.

戻り値:

a Hermitian operator.

戻り値の型:

Operator

qiskit.quantum_info.random_pauli(num_qubits, group_phase=False, seed=None)[ソース]#

Return a random Pauli.

パラメータ:
  • num_qubits (int) – the number of qubits.

  • group_phase (bool) – Optional. If True generate random phase. Otherwise the phase will be set so that the Pauli coefficient is +1 (default: False).

  • seed (int or np.random.Generator) – Optional. Set a fixed seed or generator for RNG.

戻り値:

a random Pauli

戻り値の型:

Pauli

qiskit.quantum_info.random_clifford(num_qubits, seed=None)[ソース]#

Return a random Clifford operator.

The Clifford is sampled using the method of Reference [1].

パラメータ:
  • num_qubits (int) – the number of qubits for the Clifford

  • seed (int or np.random.Generator) – Optional. Set a fixed seed or generator for RNG.

戻り値:

a random Clifford operator.

戻り値の型:

Clifford

Reference:
  1. S. Bravyi and D. Maslov, Hadamard-free circuits expose the structure of the Clifford group. arXiv:2003.09412 [quant-ph]

qiskit.quantum_info.random_quantum_channel(input_dims=None, output_dims=None, rank=None, seed=None)[ソース]#

Return a random CPTP quantum channel.

This constructs the Stinespring operator for the quantum channel by sampling a random isometry from the unitary Haar measure.

パラメータ:
  • input_dims (int or tuple) – the input dimension of the channel.

  • output_dims (int or tuple) – the input dimension of the channel.

  • rank (int) – Optional. The rank of the quantum channel Choi-matrix.

  • seed (int or np.random.Generator) – Optional. Set a fixed seed or generator for RNG.

戻り値:

a quantum channel operator.

戻り値の型:

Stinespring

例外:

QiskitError – if rank or dimensions are invalid.

qiskit.quantum_info.random_cnotdihedral(num_qubits, seed=None)[ソース]#

Return a random CNOTDihedral element.

パラメータ:
  • num_qubits (int) – the number of qubits for the CNOTDihedral object.

  • seed (int or RandomState) – Optional. Set a fixed seed or generator for RNG.

戻り値:

a random CNOTDihedral element.

戻り値の型:

CNOTDihedral

qiskit.quantum_info.random_pauli_table(num_qubits, size=1, seed=None)[ソース]#

Return a random PauliTable.

パラメータ:
  • num_qubits (int) – the number of qubits.

  • size (int) – Optional. The number of rows of the table (Default: 1).

  • seed (int or np.random.Generator) – Optional. Set a fixed seed or generator for RNG.

戻り値:

a random PauliTable.

戻り値の型:

PauliTable

qiskit.quantum_info.random_pauli_list(num_qubits, size=1, seed=None, phase=True)[ソース]#

Return a random PauliList.

パラメータ:
  • num_qubits (int) – the number of qubits.

  • size (int) – Optional. The length of the Pauli list (Default: 1).

  • seed (int or np.random.Generator) – Optional. Set a fixed seed or generator for RNG.

  • phase (bool) – If True the Pauli phases are randomized, otherwise the phases are fixed to 0. [Default: True]

戻り値:

a random PauliList.

戻り値の型:

PauliList

qiskit.quantum_info.random_stabilizer_table(num_qubits, size=1, seed=None)[ソース]#

DEPRECATED: Return a random StabilizerTable.

バージョン 0.22.0 で非推奨: The function qiskit.quantum_info.operators.symplectic.random.random_stabilizer_table() is deprecated as of qiskit-terra 0.22.0. It will be removed no earlier than 3 months after the release date. Instead, use the function random_pauli_list.

パラメータ:
  • num_qubits (int) – the number of qubits.

  • size (int) – Optional. The number of rows of the table (Default: 1).

  • seed (int or np.random.Generator) – Optional. Set a fixed seed or generator for RNG.

戻り値:

a random StabilizerTable.

戻り値の型:

PauliTable

Analysis#

qiskit.quantum_info.hellinger_distance(dist_p, dist_q)[ソース]#

Computes the Hellinger distance between two counts distributions.

パラメータ:
  • dist_p (dict) – First dict of counts.

  • dist_q (dict) – Second dict of counts.

戻り値:

Distance

戻り値の型:

float

参照

Hellinger Distance @ wikipedia

qiskit.quantum_info.hellinger_fidelity(dist_p, dist_q)[ソース]#

Computes the Hellinger fidelity between two counts distributions.

The fidelity is defined as \(\left(1-H^{2}\right)^{2}\) where H is the Hellinger distance. This value is bounded in the range [0, 1].

This is equivalent to the standard classical fidelity \(F(Q,P)=\left(\sum_{i}\sqrt{p_{i}q_{i}}\right)^{2}\) that in turn is equal to the quantum state fidelity for diagonal density matrices.

パラメータ:
  • dist_p (dict) – First dict of counts.

  • dist_q (dict) – Second dict of counts.

戻り値:

Fidelity

戻り値の型:

float

サンプル

from qiskit import QuantumCircuit, execute, BasicAer
from qiskit.quantum_info.analysis import hellinger_fidelity

qc = QuantumCircuit(5, 5)
qc.h(2)
qc.cx(2, 1)
qc.cx(2, 3)
qc.cx(3, 4)
qc.cx(1, 0)
qc.measure(range(5), range(5))

sim = BasicAer.get_backend('qasm_simulator')
res1 = execute(qc, sim).result()
res2 = execute(qc, sim).result()

hellinger_fidelity(res1.get_counts(), res2.get_counts())

参照

Quantum Fidelity @ wikipedia Hellinger Distance @ wikipedia

Z2Symmetries(symmetries, sq_paulis, sq_list)

The $Z_2$ symmetry converter identifies symmetries from the problem hamiltonian and uses them to provide a tapered - more efficient - representation of operators as Paulis for this problem.

Synthesis#

OneQubitEulerDecomposer([basis, use_dag])

A class for decomposing 1-qubit unitaries into Euler angle rotations.

TwoQubitBasisDecomposer(gate[, ...])

A class for decomposing 2-qubit unitaries into minimal number of uses of a 2-qubit basis gate.

Quaternion(data)

A class representing a Quaternion.

XXDecomposer([basis_fidelity, euler_basis, ...])

A class for optimal decomposition of 2-qubit unitaries into 2-qubit basis gates of XX type (i.e., each locally equivalent to CAN(alpha, 0, 0) for a possibly varying alpha).

qiskit.quantum_info.two_qubit_cnot_decompose(*args, **kwargs)#
戻り値の型:

QuantumCircuit

qiskit.quantum_info.decompose_clifford(clifford, method=None)[ソース]#

DEPRECATED: Decompose a Clifford operator into a QuantumCircuit.

For N <= 3 qubits this is based on optimal CX cost decomposition from reference [1]. For N > 3 qubits this is done using the general non-optimal greedy compilation routine from reference [3], which typically yields better CX cost compared to the AG method in [2].

バージョン 0.23.0 で非推奨: The function qiskit.quantum_info.synthesis.clifford_decompose.decompose_clifford() is deprecated as of qiskit-terra 0.23.0. It will be removed no earlier than 3 months after the release date. Instead, use the function qiskit.synthesis.synth_clifford_full.

パラメータ:
  • clifford (Clifford) – a clifford operator.

  • method (str) – Optional, a synthesis method (『AG』 or 『greedy』). If set this overrides optimal decomposition for N <=3 qubits.

戻り値:

a circuit implementation of the Clifford.

戻り値の型:

QuantumCircuit

参照

  1. S. Bravyi, D. Maslov, Hadamard-free circuits expose the structure of the Clifford group, arXiv:2003.09412 [quant-ph]

  2. S. Aaronson, D. Gottesman, Improved Simulation of Stabilizer Circuits, Phys. Rev. A 70, 052328 (2004). arXiv:quant-ph/0406196

  3. Sergey Bravyi, Shaohan Hu, Dmitri Maslov, Ruslan Shaydulin, Clifford Circuit Optimization with Templates and Symbolic Pauli Gates, arXiv:2105.02291 [quant-ph]