paddle_quantum.gate.clifford

Class for randomly generating a Clifford operator.

class paddle_quantum.gate.clifford.Clifford(num_qubits)

Bases: object

Users can instantiate this class to randomly generate a Clifford operator.

Parameters:

num_qubits (int) – Number of qubits on which this Clifford operator acts.

References

1. Bravyi, Sergey, and Dmitri Maslov. “Hadamard-free circuits expose the structure of the Clifford group.” IEEE Transactions on Information Theory 67.7 (2021): 4546-4563.

print_clifford()

Print how the Clifford operator acts on the Pauli basis.

sym()

Obtain the Clifford operator’s symplectic matrix.

Returns:

Symplectic matrix corresponding to this Clifford operator.

Return type:

ndarray

tableau()

Obtain the Clifford operator’s table.

For the number of qubits being num_qubits, the first num_qubits lines correspoding to results of \(X_i\), and the last num_qubits lines correspoding to results of \(Z_i\).

Returns:

Table corresponding to this Clifford operator.

Return type:

ndarray

circuit()

Obtain the circuit corresponding to the Clifford operator.

Returns:

Circuit corresponding to this Clifford operator.

Return type:

Circuit

paddle_quantum.gate.clifford.compose_clifford_circuit(clifd1, clifd2)

Compute the composition of two Clifford operators and obtain the corresponding circuit.

Parameters:
  • clifd1 (Clifford) – The first Clifford operator to be composed.

  • clifd2 (Clifford) – The second Clifford operator to be composed.

Returns:

Circuit corresponding to the composed Clifford operator.

Return type:

Circuit