GithubHelp home page GithubHelp logo

nerator / matr2scheme Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 122 KB

algorithm for decomposition of arbitrary unitary matrix into product of two-level matrices

License: GNU General Public License v3.0

Scala 100.00%
quantum-computing matrix-decompositions

matr2scheme's People

Contributors

klntsky avatar nerator avatar

Stargazers

 avatar  avatar

Watchers

 avatar

matr2scheme's Issues

Program crashes with eye matrix as an input

matrix2.txt:

1  0  0  0  
0  1  0  0  
0  0  1  0  
0  0  0  1 

running:

$ ./matr2scheme ../matrix2.txt 
Программа для разложения унитарной матрицы на произведение двухуровневых матриц.
Автор: Довжиков Сергей

Исходная матрица:
1  0  0  0  
0  1  0  0  
0  0  1  0  
0  0  0  1  

Результат (по Нильсен, Чанг):
Проверка равенства произведения матриц исходной:
Exception in thread "main" java.lang.UnsupportedOperationException: empty.reduceLeft
	at scala.collection.LinearSeqOptimized.reduceLeft(LinearSeqOptimized.scala:139)
	at scala.collection.LinearSeqOptimized.reduceLeft$(LinearSeqOptimized.scala:138)
	at scala.collection.immutable.List.reduceLeft(List.scala:89)
	at scala.collection.TraversableOnce.reduce(TraversableOnce.scala:211)
	at scala.collection.TraversableOnce.reduce$(TraversableOnce.scala:211)
	at scala.collection.AbstractTraversable.reduce(Traversable.scala:108)
	at quant.tools.Runner$.runAlg(Runner.scala:42)
	at quant.tools.Runner$.$anonfun$new$2(Runner.scala:102)
	at quant.tools.Runner$.$anonfun$new$2$adapted(Runner.scala:102)
	at scala.util.Either.fold(Either.scala:191)
	at quant.tools.Runner$.delayedEndpoint$quant$tools$Runner$1(Runner.scala:102)
	at quant.tools.Runner$delayedInit$body.apply(Runner.scala:14)
	at scala.Function0.apply$mcV$sp(Function0.scala:39)
	at scala.Function0.apply$mcV$sp$(Function0.scala:39)
	at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
	at scala.App.$anonfun$main$1$adapted(App.scala:80)
	at scala.collection.immutable.List.foreach(List.scala:392)
	at scala.App.main(App.scala:80)
	at scala.App.main$(App.scala:78)
	at quant.tools.Runner$.main(Runner.scala:14)
	at quant.tools.Runner.main(Runner.scala)

Scala 2.13.0

  • scala-reflect
  • scala-library
  • scala-compiler

  • breeze
  • scala-parser-combinators
  • scalatest

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.