public void PQTermABFromGeneralHamiltonianTest() { var generalHamiltonian = new FermionHamiltonian(nOrbitals: 1, nElectrons: 1); generalHamiltonian.AddFermionTerm(PQTermType, new Int64[] { 0, 1 }, 2.0); var jwEvolutionSetData = JordanWignerEncoding.Create(generalHamiltonian); var termData = jwEvolutionSetData.Terms; using (var qsim = new QuantumSimulator()) { PQTermABFromGeneralHamiltonianTestOp.Run(qsim, termData).Wait(); } }
public void PQTermABFromGeneralHamiltonianTest() { var generalHamiltonian = new FermionHamiltonian(); generalHamiltonian.Add(new HermitianFermionTerm(new[] { 0, 1 }.ToLadderSequence()), 2.0); var(identityCoefficient, qubits, termData) = generalHamiltonian.ToPauliHamiltonian().ToQSharpFormat(); using (var qsim = new QuantumSimulator()) { PQTermABFromGeneralHamiltonianTestOp.Run(qsim, termData).Wait(); } }