pychemiq.Circuit#
Module Contents#
Construct Ansatz submodule for quantum circuit ansatz.
Functions#
- pychemiq.Circuit.Ansatz.UCC(ucc_type, n_electrons, mapping_type, chemiq=None)#
Construct a quantum circuit ansatz using the unitary coupled cluster operator.
- Parameters:
ucc_type (str) – The excitation level of the input unitary coupling cluster. Currently available: UCCS, UCCD, UCCSD.
n_electrons (int) – Input the number of electrons in the molecular system.
mapping_type (MappingType) – Input the mapping type of the unitary coupling cluster operator. Please refer to pychemiq.Transform.Mapping for details.
chemiq (ChemiQ) – Specify the chemiq class. Please refer to pychemiq.ChemiQ for details.
- Returns:
Output the AbstractAnsatz class with the specified excitation level.
- pychemiq.Circuit.Ansatz.HardwareEfficient(n_electrons, chemiq=None)#
Construct quantum circuit ansatz using HardwareEfficient.
- Parameters:
n_electrons (int) – Input the number of electrons of the molecular system.
chemiq (ChemiQ) – Specify the chemiq class. Please refer to pychemiq.ChemiQ for details.
- Returns:
Output the proposed AbstractAnsatz class.
- pychemiq.Circuit.Ansatz.SymmetryPreserved(n_electrons, chemiq=None)#
Construct quantum circuit ansatz using SymmetryPreserved.
- Parameters:
n_electrons (int) – Input the number of electrons in the molecular system.
chemiq (ChemiQ) – Specify the chemiq class. Please refer to pychemiq.ChemiQ for details.
- Returns:
Output the proposed Abstract Ansatz class.
- pychemiq.Circuit.Ansatz.UserDefine(n_electrons, circuit=None, fermion=None, chemiq=None)#
Construct quantum circuit ansatz using user-defined methods.
- Parameters:
n_electrons (int) – Input the number of electrons in the molecular system.
circuit (str) – Construct the originIR string of the quantum circuit.
fermion (FermionOperator) – The fermionic operator class for constructing quantum circuits.
chemiq (ChemiQ) – Specify the chemiq class. Please refer to pychemiq.ChemiQ for details.
- Returns:
Output the customized AbstractAnsatz class.
Note
For detailed call examples of the first three functions of the Ansatz module, please refer to Ansatz Tutorial in the basic tutorial. For an example of calling the last function, please refer to Quantum Circuit Tutorial in the advanced tutorial.