Clifford
QuICT.qcda.synthesis.clifford.CliffordUnidirectionalSynthesizer ¶
Bases: object
Construct \(L_1, …, L_n\) such that \(C = L_1 … L_j C_j\), where \(C_j\) acts trivially on the first \(j\) qubits. By induction the original Clifford circuit \(C\) is synthesized.
Reference
Clifford Circuit Optimization with Templates and Symbolic Pauli Gates
https://arxiv.org/abs/2105.02291
Examples:
>>> from QuICT.qcda.synthesis.clifford.clifford_synthesizer import CliffordUnidirectionalSynthesizer
>>> CUS = CliffordUnidirectionalSynthesizer()
>>> circ_syn = CUS.execute(circ)
Parameters:
-
strategy(str, default:'greedy') –strategy of choosing qubit for each step, in ['greedy', 'random']
Source code in QuICT/qcda/synthesis/clifford/clifford_synthesizer.py
disentangle_one_qubit
staticmethod
¶
Disentangle the target qubit from gates, i.e. for CompositeGate \(C\), give the CompositeGate \(L\) such that \(L^{-1} C\) acts trivially on the target qubit.
Parameters:
-
gates(CompositeGate) –the CompositeGate to be disentangled
-
width(int) –the width of the operators
-
target(int) –the target qubit to be disentangled from gates
Returns:
-
CompositeGate(CompositeGate) –the disentangler
Source code in QuICT/qcda/synthesis/clifford/clifford_synthesizer.py
execute ¶
Synthesize the Clifford circuit
Parameters:
-
gates(Circuit / CompositeGate) –the Clifford Circuit/CompositeGate to be synthesized
Returns:
-
CompositeGate(CompositeGate) –the synthesized Clifford CompositeGate
Source code in QuICT/qcda/synthesis/clifford/clifford_synthesizer.py
QuICT.qcda.synthesis.clifford.CliffordBidirectionalSynthesizer ¶
CliffordBidirectionalSynthesizer(qubit_strategy: str = 'greedy', pauli_strategy: str = 'random', shots: int = 1, multiprocess: bool = False, process: int = 4, chunksize: int = 64)
Bases: object
Construct \(L_1, …, L_n, R_1, …, R_n\) such that \(C = L_1 … L_j C_j R_j … R_1\), where \(C_j\) acts trivially on the first \(j\) qubits. By induction the original Clifford circuit \(C\) is synthesized.
Reference
Clifford Circuit Optimization with Templates and Symbolic Pauli Gates
https://arxiv.org/abs/2105.02291
Examples:
>>> from QuICT.qcda.synthesis.clifford.clifford_synthesizer import CliffordBidirectionalSynthesizer
>>> CBS = CliffordBidirectionalSynthesizer()
>>> circ_syn = CBS.execute(circ)
Parameters:
-
qubit_strategy(str, default:'greedy') –strategy of choosing qubit for each step, in ['greedy', 'random']
-
pauli_strategy(str, default:'random') –strategy of choosing PauliOperator for each step, in ['greedy', 'random']
-
shots(int, default:1) –if pauli_strategy is random, shots of random
-
multiprocess(bool, default:False) –whether to use the multiprocessing acceleration
-
process(int, default:4) –the number of processes in a pool
-
chunksize(int, default:64) –iteration dealt with in a process
Source code in QuICT/qcda/synthesis/clifford/clifford_synthesizer.py
disentangle_one_qubit
staticmethod
¶
disentangle_one_qubit(gates: CompositeGate, target: int, p1: PauliOperator, p2: PauliOperator) -> Tuple[CompositeGate, CompositeGate]
Disentangle the target qubit from gates, i.e. for CompositeGate \(C\), give the CompositeGate \(L, R\) such that \(L^{-1} C R^{-1}\) acts trivially on the target qubit.
Parameters:
-
gates(CompositeGate) –the CompositeGate to be disentangled
-
target(int) –the target qubit to be disentangled from gates
-
p1(PauliOperator) –PauliOperator \(P\)
-
p2(PauliOperator) –PauliOperator \(P'\)
Returns:
-
Tuple[CompositeGate, CompositeGate]–Tuple[CompositeGate, CompositeGate]: the left and right disentangler
Source code in QuICT/qcda/synthesis/clifford/clifford_synthesizer.py
execute ¶
Synthesize the Clifford circuit
Parameters:
-
gates(Circuit / CompositeGate) –the Clifford Circuit/CompositeGate to be synthesized
Returns:
-
CompositeGate(CompositeGate) –the synthesized Clifford CompositeGate