Open ikkoham opened 3 years ago
Hello, I want to participate in this project. Can I join the team?
I'm interested in this project. Could I join this team?
I am also interested in this project!!
It seems very interesting. I want to reduce measurement too. Can I join this project?
it is very groundbreaking idea! Can i participate?
Fork Qiskit-Terra
Make your branch to work
For CLI
git clone https://github.com/Qiskit/qiskit-terra.git
git remote add sky-born https://github.com/sky-born/qiskit-terra
git fetch sky-born
git switch -c qiskit_korea_hackerthon sky-born/qiskit_korea_hackerthon
It may be better to prepare the molecule for benchmark.
I saw LiH, BeH2, H2O, NH3, HCl is in the paper. Should we use that??
You can choose it. You can use same molecules with the paper, or it may be interesting to study and compare other molecules. Note that the paper uses Ancillary files in https://arxiv.org/abs/1701.08213. if you want to use Ancillary files, you need to parse the data and make PauliSumOp from them.
How can I extract Pauli string from PaulisumOp operator?
and SummedOp too, It's not easy to extract Pauli string operators from PaulisumOp and SummedOp class
This is a hint for creating Pauli graph. https://github.com/Qiskit/qiskit-terra/pull/5299/files
Hint for _anti_commutation_graph(ops: PauliSumOp) -> List[Tuple[int, int]]:
For TPB (qubit-wise anti-commutation graph),
# convert a Pauli operator into int vector where {I: 0, X: 2, Y: 3, Z: 1}
mat1 = np.array(
[op.primitive.table.Z[0] + 2 * op.primitive.table.X[0] for op in observable],
dtype=np.int8,
)
mat2 = mat1[:, None]
# mat3[i, j] is True if i and j are commutable with TPB
mat3 = (mat1 * mat2) * (mat1 - mat2)
mat4 = (mat3 == 0).all(axis=2)
# return [(i, j) if mat3[i, j] is False and i < j]
return list(zip(*np.where(np.triu(np.logical_not(mat4), k=1))))
For ALL, (general anti-commutation graph),
# convert a Pauli operator into int vector where {I: 0, X: 2, Y: 3, Z: 1}
mat1 = np.array(
[op.primitive.table.Z[0] + 2 * op.primitive.table.X[0] for op in observable],
dtype=np.int8,
)
mat2 = mat1[:, None]
# mat3[i, j] is True if i and j are commutable with TPB
mat3 = (mat1 * mat2) * (mat1 - mat2)
mat4 = mat3.copy()
mat4[mat3 == 0] = 1
mat4[mat3 != 0] = -1
mat5 = np.multiply.reduce(mat4, axis=2) == 1
return list(zip(*np.where(np.triu(np.logical_not(mat5), k=1))))
This algorithm is too difficult because I use numpy technique for performance.
Abstract
Reduction of the number of measurements is one of the most important topic for variational quantum algorithms. In Qiskit, Abelian grouper was implemented for the evaluations of expectation values by joint measurement of tensor product basis (TPB). This project enhances the grouper by using entangled measurements.
Description
This project aims to implement a part of our research for Qiskit and improve the research. The number of measurements can be reduced by entangled measurements. For example, Bell measurement is a joint measurement of XX, YY, and ZZ.
We use the entangled joint measurements to improve the grouper. Very recently, I have added the parameter
grouping_type
for this purpose.https://github.com/Qiskit/qiskit-terra/blob/master/qiskit/opflow/primitive_ops/pauli_sum_op.py#L39Milestone
References
Members
@slackhandle
email:example@example.com
Deliverable
GitHub repo